File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ import type { ActorCallOptions } from 'apify-client';
77import type { Request , Response } from 'express' ;
88import express from 'express' ;
99
10- import { HEADER_READINESS_PROBE , Routes } from './const.js' ;
10+ import { getActorsAsTools } from './actors.js' ;
11+ import { defaults , HEADER_READINESS_PROBE , Routes } from './const.js' ;
1112import { processInput } from './input.js' ;
1213import { log } from './logger.js' ;
1314import { ApifyMcpServer } from './server.js' ;
@@ -144,6 +145,10 @@ if (STANDBY_MODE) {
144145 if ( input . enableAddingActors ) {
145146 mcpServer . updateTools ( getActorAutoLoadingTools ( ) ) ;
146147 }
148+ const actors = input . actors ?? defaults . actors ;
149+ const actorsToLoad = Array . isArray ( actors ) ? actors : actors . split ( ',' ) ;
150+ const actorTools = await getActorsAsTools ( actorsToLoad ) ;
151+ mcpServer . updateTools ( actorTools ) ;
147152 app . listen ( PORT , ( ) => {
148153 log . info ( `The Actor web server is listening for user requests at ${ HOST } ` ) ;
149154 } ) ;
You can’t perform that action at this time.
0 commit comments