Changesets · Branches · Tags · Compare
| Changeset | 631c10de5d5cee7191c9dcdd789798b1b4f390c7b252e4580dae51b4b9ac7810 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-09-11 14:28 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-09-11 14:28 -07:00 |
| Parents | 54c1c444611d, 2a25cc336735 |
1 file changed
modified core/tools/callTool.ts +9 −4
| @@ -1,3 +1,4 @@ | ||
| 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 @@ | ||
| 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)); |