Skip to content

Commit 52f4b73

Browse files
committed
fix: Actor auto loading
1 parent 4bc610d commit 52f4b73

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ The server provides a set of helper tools to discover available Actors and retri
9797

9898
There are also tools to manage the available tools list. However, dynamically adding and removing tools requires the MCP client to have the capability to manage the tools list, which is typically not supported.
9999

100-
You can try this functionality using the [Apify Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) Actor. To enable it, set the `enableActorAutoLoading` parameter.
100+
You can try this functionality using the [Apify Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) Actor.
101+
To enable it, set the `enableActorAutoLoading` parameter.
101102

102103
- `add-actor-as-tool`: Adds an Actor by name to the available tools list without executing it, requiring user consent to run later.
103104
- `remove-actor-from-tool`: Removes an Actor by name from the available tools list when it's no longer needed.
@@ -206,7 +207,6 @@ Alternatively, you can use simple python [client_see.py](https://github.com/apif
206207
207208
### Install
208209
209-
Follow the steps below to set up and run the server on your local machine:
210210
First, clone the repository using the following command:
211211
212212
```bash

src/main.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ async function processParamsAndUpdateTools(url: string) {
4545
const input = await processInput(params as unknown as Input);
4646
if (input.actors) {
4747
await mcpServer.addToolsFromActors(input.actors as string[]);
48-
} else {
49-
log.debug(`Server is running in STANDBY mode with the following Actors (tools): ${mcpServer.getToolNames()}.
50-
To use different Actors, provide them in query parameter "actors" or include them in the Actor Task input.`);
5148
}
49+
if (input.enableActorAutoLoading) {
50+
mcpServer.updateTools(getActorAutoLoadingTools());
51+
}
52+
log.debug(`Server is running in STANDBY mode with the following Actors (tools): ${mcpServer.getToolNames()}.
53+
To use different Actors, provide them in query parameter "actors" or include them in the Actor Task input.`);
5254
}
5355

5456
app.route(Routes.ROOT)

0 commit comments

Comments
 (0)