|
|
@@ -178,7 +178,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number
|
|
|
return dynamicTool({
|
|
|
description: mcpTool.description ?? "",
|
|
|
inputSchema: jsonSchema(schema),
|
|
|
- execute: async (args: unknown) => {
|
|
|
+ execute: async (args: unknown, options) => {
|
|
|
return client.callTool(
|
|
|
{
|
|
|
name: mcpTool.name,
|
|
|
@@ -187,6 +187,7 @@ function convertMcpTool(mcpTool: MCPToolDef, client: MCPClient, timeout?: number
|
|
|
CallToolResultSchema,
|
|
|
{
|
|
|
resetTimeoutOnProgress: true,
|
|
|
+ signal: options.abortSignal,
|
|
|
timeout,
|
|
|
},
|
|
|
)
|