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,12 +7,13 @@ 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 { defaults , HEADER_READINESS_PROBE , Routes } from './const.js' ;
1111import { processInput } from './input.js' ;
1212import { log } from './logger.js' ;
1313import { ApifyMcpServer } from './server.js' ;
1414import { getActorDiscoveryTools , getActorAutoLoadingTools } from './tools.js' ;
1515import type { Input } from './types.js' ;
16+ import { getActorsAsTools } from './actors' ;
1617
1718await Actor . init ( ) ;
1819
@@ -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