You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: `This tool calls the Actor "${actorDefinitionPruned.actorFullName}" and retrieves its output results. Use this tool instead of the "${HelperTools.ACTOR_CALL}" if user requests to use this specific Actor.
141
+
Actor description: ${actorDefinitionPruned.description}
142
+
Instructions: ${ACTOR_ADDITIONAL_INSTRUCTIONS}`,
145
143
inputSchema: actorDefinitionPruned.input
146
144
// So Actor without input schema works - MCP client expects JSON schema valid output
147
145
||{
@@ -246,53 +244,84 @@ export async function getActorsAsTools(
246
244
247
245
constcallActorArgs=z.object({
248
246
actor: z.string()
249
-
.describe('The name of the Actor to call. For example, "apify/instagram-scraper".'),
247
+
.describe('The name of the Actor to call. For example, "apify/rag-web-browser".'),
248
+
step: z.enum(['info','call'])
249
+
.default('info')
250
+
.describe(`Step to perform: "info" to get Actor details and input schema (required first step), "call" to execute the Actor (only after getting info).`),
250
251
input: z.object({}).passthrough()
251
-
.describe('The input JSON to pass to the Actor. For example, {"query": "apify", "maxItems": 10}.'),
252
+
.optional()
253
+
.describe(`The input JSON to pass to the Actor. For example, {"query": "apify", "maxResults": 5, "outputFormats": ["markdown"]}. Required only when step is "call".`),
.describe(`Memory allocation for the Actor in MB. Must be a power of 2 (e.g., 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768). Minimum: 128 MB, Maximum: 32768 MB (32 GB).`),
260
+
timeout: z.number()
261
+
.min(0,'Timeout must be 0 or greater')
262
+
.optional()
263
+
.describe(`Maximum runtime for the Actor in seconds. After this time elapses, the Actor will be automatically terminated. Use 0 for infinite timeout (no time limit). Minimum: 0 seconds (infinite).`),
255
264
}).optional()
256
-
.describe('Optional call options for the Actor.'),
265
+
.describe('Optional call options for the Actor run configuration.'),
257
266
});
258
267
259
268
exportconstcallActor: ToolEntry={
260
269
type: 'internal',
261
270
tool: {
262
271
name: HelperTools.ACTOR_CALL,
263
272
actorFullName: HelperTools.ACTOR_CALL,
264
-
description: `Call an Actor and get the Actor run results. If you are not sure about the Actor input, you MUST get the Actor details first, which also returns the input schema using ${HelperTools.ACTOR_GET_DETAILS}. The Actor MUST be added before calling; use the ${HelperTools.ACTOR_ADD} tool first. By default, the Apify MCP server makes newly added Actors available as tools for calling. Use this tool ONLY if you cannot call the newly added tool directly, and NEVER call this tool before first trying to call the tool directly. For example, when you add an Actor "apify/instagram-scraper" using the ${HelperTools.ACTOR_ADD} tool, the Apify MCP server will add a new tool ${actorNameToToolName('apify/instagram-scraper')} that you can call directly. If calling this tool does not work, then and ONLY then MAY you use this tool as a backup.`,
273
+
description: `Call Any Actor from Apify Store - Two-Step Process
274
+
275
+
This tool uses a mandatory two-step process to safely call any Actor from the Apify store.
276
+
277
+
USAGE:
278
+
• ONLY for Actors that are NOT available as dedicated tools
279
+
• If a dedicated tool exists (e.g., ${actorNameToToolName('apify/rag-web-browser')}), use that instead
280
+
281
+
MANDATORY TWO-STEP WORKFLOW:
282
+
283
+
Step 1: Get Actor Info (step="info", default)
284
+
• First call this tool with step="info" to get Actor details and input schema
285
+
• This returns the Actor description, documentation, and required input schema
286
+
• You MUST do this step first - it's required to understand how to call the Actor
287
+
288
+
Step 2: Call Actor (step="call")
289
+
• Only after step 1, call again with step="call" and proper input based on the schema
290
+
• This executes the Actor and returns the results
291
+
292
+
The step parameter enforces this workflow - you cannot call an Actor without first getting its info.`,
content: [{type: 'text',text: `Actor information for '${parsed.actor}' was not found. Please check the Actor ID or name and ensure the Actor exists.`}],
0 commit comments