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
exportconstRAG_WEB_BROWSER_ADDITIONAL_DESC=`This tool provides general web browsing functionality, for specific sites like e-commerce, social media it is always better to search for a specific Actor`;
51
53
52
54
exportconstdefaults={
53
55
actors: [
54
-
ACTOR_RAG_WEB_BROWSER,
56
+
RAG_WEB_BROWSER,
55
57
],
56
58
};
57
59
58
-
exportconstACTOR_ADDITIONAL_INSTRUCTIONS='Never call/execute tool/Actor unless confirmed by the user.';
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.
180
-
Actor description: ${actorDefinitionPruned.description}
181
-
Instructions: ${ACTOR_ADDITIONAL_INSTRUCTIONS}`,
182
-
inputSchema: actorDefinitionPruned.input
183
-
// So Actor without input schema works - MCP client expects JSON schema valid output
.describe('The name of the Actor to call. For example, "apify/rag-web-browser".'),
305
308
step: z.enum(['info','call'])
306
309
.default('info')
307
-
.describe(`Step to perform: "info" to get Actor details and input schema (required first step), "call" to execute the Actor (only after getting info).`),
310
+
.describe(`Step to perform: "info" to get Actor details and input schema (required first step), "call" to run the Actor (only after getting info).`),
308
311
input: z.object({}).passthrough()
309
312
.optional()
310
313
.describe(`The input JSON to pass to the Actor. For example, {"query": "apify", "maxResults": 5, "outputFormats": ["markdown"]}. Required only when step is "call".`),
description: `Call Any Actor from Apify Store - Two-Step Process
333
+
description: `Call any Actor from the Apify Store using a mandatory two-step workflow.
334
+
This ensures you first get the Actor’s input schema and details before executing it safely.
331
335
332
-
This tool uses a mandatory two-step process to safely call any Actor from the Apify store.
336
+
There are two ways to run Actors:
337
+
1. Dedicated Actor tools (e.g., ${actorNameToToolName('apify/rag-web-browser')}): These are pre-configured tools, offering a simpler and more direct experience.
338
+
2. Generic call-actor tool (${HelperTools.ACTOR_CALL}): Use this when a dedicated tool is not available or when you want to run any Actor dynamically. This tool is especially useful if you do not want to add specific tools or your client does not support dynamic tool registration.
333
339
334
-
USAGE:
335
-
• ONLY for Actors that are NOT available as dedicated tools
336
-
• If a dedicated tool exists (e.g., ${actorNameToToolName('apify/rag-web-browser')}), use that instead
340
+
**Important:**
341
+
342
+
Typically, a successful run returns a \`datasetId\` (the Actor's output stored as an Apify dataset) and a short preview of items.
343
+
To fetch the full output, use the ${HelperTools.ACTOR_OUTPUT_GET} tool with the \`datasetId\`.
337
344
338
-
MANDATORY TWO-STEP WORKFLOW:
345
+
USAGE:
346
+
- Always use dedicated tools when available (e.g., ${actorNameToToolName('apify/rag-web-browser')})
347
+
- Use the generic call-actor tool only if a dedicated tool does not exist for your Actor.
339
348
349
+
MANDATORY TWO-STEP-WORKFLOW:
340
350
Step 1: Get Actor Info (step="info", default)
341
-
• First call this tool with step="info" to get Actor details and input schema
342
-
• For regular Actors: returns the Actor input schema
343
-
• For MCP server Actors: returns list of available tools with their schemas
344
-
• You MUST do this step first - it's required to understand how to call the Actor
351
+
- First call this tool with step="info" to get Actor details and input schema
352
+
- This returns the Actor description, documentation, and required input schema
353
+
- You MUST do this step first - it's required to understand how to call the Actor
345
354
346
355
Step 2: Call Actor (step="call")
347
-
• Only after step 1, call again with step="call" and proper input based on the schema
348
-
• For regular Actors: executes the Actor and returns results
349
-
• For MCP server Actors: use format "actor-name:tool-name" to call specific tools
350
-
351
-
MCP SERVER ACTORS:
352
-
• For MCP server actors, step="info" lists available tools instead of input schema
353
-
• To call an MCP tool, use actor name format: "actor-name:tool-name" with step="call"
0 commit comments