File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import log from '@apify/log';
1313
1414import { type ActorsMcpServer } from '../mcp/server.js' ;
1515import { processParamsGetTools } from '../mcp/utils.js' ;
16+ import { addTool , removeTool } from '../tools/helpers.js' ;
1617import { getHelpMessage , HEADER_READINESS_PROBE , Routes } from './const.js' ;
1718import { getActorRunData } from './utils.js' ;
1819
@@ -69,7 +70,9 @@ export function createExpressApp(
6970 const tools = await processParamsGetTools ( req . url , process . env . APIFY_TOKEN as string ) ;
7071 if ( tools . length > 0 ) {
7172 mcpServer . updateTools ( tools ) ;
72- } else {
73+ }
74+ // TODO fix this - we should not be loading default tools here or provide more generic way
75+ if ( tools . length === 2 && tools . includes ( addTool ) && tools . includes ( removeTool ) ) {
7376 // We are loading default Actors (if not specified otherwise), so that we don't have "empty" tools
7477 await mcpServer . loadDefaultTools ( process . env . APIFY_TOKEN as string ) ;
7578 }
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export class ActorsMcpServer {
102102 /**
103103 * Loads tools from URL params.
104104 *
105- * This method also handles enabling of Actor auto loading via the processParamsGetTools.
105+ * This method also handles enabling of Actor autoloading via the processParamsGetTools.
106106 *
107107 * Used primarily for SSE.
108108 */
You can’t perform that action at this time.
0 commit comments