Skip to content

Commit a9d6ec0

Browse files
authored
Merge pull request #8 from cs50victor/fix/mcp_tool_timeout
fix: pass MCP_TIMEOUT to SDK callTool requests
2 parents f010748 + 2826144 commit a9d6ec0

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/client.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,14 @@ export async function callTool(
301301
args: Record<string, unknown>,
302302
): Promise<unknown> {
303303
return withRetry(async () => {
304-
const result = await client.callTool({
305-
name: toolName,
306-
arguments: args,
307-
});
304+
const result = await client.callTool(
305+
{
306+
name: toolName,
307+
arguments: args,
308+
},
309+
undefined,
310+
{ timeout: getTimeoutMs() },
311+
);
308312
return result;
309313
}, `call tool ${toolName}`);
310314
}

0 commit comments

Comments
 (0)