mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-14 07:00:47 +00:00
mcp call tools timeout (#5123)
This commit is contained in:
@@ -110,10 +110,16 @@ export class MCPClient {
|
||||
const client = await this.getConnection();
|
||||
addLog.debug(`[MCP Client] Call tool: ${toolName}`, params);
|
||||
|
||||
return await client.callTool({
|
||||
name: toolName,
|
||||
arguments: params
|
||||
});
|
||||
return await client.callTool(
|
||||
{
|
||||
name: toolName,
|
||||
arguments: params
|
||||
},
|
||||
undefined,
|
||||
{
|
||||
timeout: 300000
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
addLog.error(`[MCP Client] Failed to call tool ${toolName}:`, error);
|
||||
return Promise.reject(error);
|
||||
|
Reference in New Issue
Block a user