55import type { Client } from '@modelcontextprotocol/sdk/client/index.js' ;
66import { Server } from '@modelcontextprotocol/sdk/server/index.js' ;
77import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js' ;
8- import { CallToolRequestSchema , ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js' ;
8+ import { CallToolRequestSchema , CallToolResultSchema , ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js' ;
99import type { ActorCallOptions } from 'apify-client' ;
1010
1111import log from '@apify/log' ;
@@ -28,6 +28,7 @@ import {
2828import { actorNameToToolName } from '../tools/utils.js' ;
2929import type { ActorMCPTool , ActorTool , HelperTool , ToolWrap } from '../types.js' ;
3030import { createMCPClient } from './client.js' ;
31+ import { EXTERNAL_TOOL_CALL_TIMEOUT_MSEC } from './const.js' ;
3132import { processParamsGetTools } from './utils.js' ;
3233
3334type ActorsMcpServerOptions = {
@@ -223,6 +224,8 @@ export class ActorsMcpServer {
223224 const res = await client . callTool ( {
224225 name : serverTool . originToolName ,
225226 arguments : args ,
227+ } , CallToolResultSchema , {
228+ timeout : EXTERNAL_TOOL_CALL_TIMEOUT_MSEC ,
226229 } ) ;
227230
228231 return { ...res } ;
0 commit comments