File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change
1
+ import { CallToolResultSchema } from "@modelcontextprotocol/sdk/types.js" ;
1
2
import { ContextItem , Tool , ToolCall , ToolExtras } from ".." ;
2
3
import { MCPManagerSingleton } from "../context/mcp/MCPManagerSingleton" ;
3
4
import { canParseUrl } from "../util/url" ;
@@ -87,10 +88,14 @@ async function callToolFromUri(
87
88
if ( ! client ) {
88
89
throw new Error ( "MCP connection not found" ) ;
89
90
}
90
- const response = await client . client . callTool ( {
91
- name : toolName ,
92
- arguments : args ,
93
- } ) ;
91
+ const response = await client . client . callTool (
92
+ {
93
+ name : toolName ,
94
+ arguments : args ,
95
+ } ,
96
+ CallToolResultSchema ,
97
+ { timeout : client . options . timeout } ,
98
+ ) ;
94
99
95
100
if ( response . isError === true ) {
96
101
throw new Error ( JSON . stringify ( response . content ) ) ;
You can’t perform that action at this time.
0 commit comments