Describe the bug
Using the useApp hook, I notice app.ontoolinput is not consistently called although it is registered before app.connect
To Reproduce
Steps to reproduce the behavior:
- Instantiate
useApp() with a minimal setup:
import { useApp } from "@modelcontextprotocol/ext-apps/react";
//...
useApp({
appInfo: { name: "Describe your app here...", version: "1.0.0" },
capabilities: {},
onAppCreated: (app) => {
app.ontoolinput = (input) => {
console.info("Received tool call input:", input);
};
},
});
- Run the app in any host
- Call a tool with user input using a manual prompt
- Notice how
app.ontoolinput is not always called
Expected behavior
app.ontoolinput is called every time a tool is invoked
Logs
If applicable, add logs to help explain your problem.
Additional context
Other callbacks seem to run as expected, including app.ontoolresult.
Describe the bug
Using the
useApphook, I noticeapp.ontoolinputis not consistently called although it is registered beforeapp.connectTo Reproduce
Steps to reproduce the behavior:
useApp()with a minimal setup:app.ontoolinputis not always calledExpected behavior
app.ontoolinputis called every time a tool is invokedLogs
If applicable, add logs to help explain your problem.
Additional context
Other callbacks seem to run as expected, including
app.ontoolresult.