@apify/actors-mcp-server 0.9.21-beta.1 → 0.9.21-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/const.d.ts +1 -1
  2. package/dist/const.d.ts.map +1 -1
  3. package/dist/const.js +1 -1
  4. package/dist/const.js.map +1 -1
  5. package/dist/tools/apps/call_actor.d.ts.map +1 -1
  6. package/dist/tools/apps/call_actor.js +0 -3
  7. package/dist/tools/apps/call_actor.js.map +1 -1
  8. package/dist/tools/apps/search_actors_widget.d.ts +3 -0
  9. package/dist/tools/apps/search_actors_widget.d.ts.map +1 -0
  10. package/dist/tools/apps/search_actors_widget.js +113 -0
  11. package/dist/tools/apps/search_actors_widget.js.map +1 -0
  12. package/dist/tools/categories.d.ts.map +1 -1
  13. package/dist/tools/categories.js +3 -4
  14. package/dist/tools/categories.js.map +1 -1
  15. package/dist/tools/core/call_actor_common.d.ts +0 -3
  16. package/dist/tools/core/call_actor_common.d.ts.map +1 -1
  17. package/dist/tools/core/call_actor_common.js +7 -12
  18. package/dist/tools/core/call_actor_common.js.map +1 -1
  19. package/dist/tools/core/search_actors_common.d.ts +5 -4
  20. package/dist/tools/core/search_actors_common.d.ts.map +1 -1
  21. package/dist/tools/core/search_actors_common.js +5 -9
  22. package/dist/tools/core/search_actors_common.js.map +1 -1
  23. package/dist/tools/default/call_actor.d.ts.map +1 -1
  24. package/dist/tools/default/call_actor.js +0 -3
  25. package/dist/tools/default/call_actor.js.map +1 -1
  26. package/dist/tools/structured_output_schemas.d.ts +182 -4
  27. package/dist/tools/structured_output_schemas.d.ts.map +1 -1
  28. package/dist/tools/structured_output_schemas.js +13 -12
  29. package/dist/tools/structured_output_schemas.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/dist/utils/server-instructions/index.d.ts +3 -4
  32. package/dist/utils/server-instructions/index.d.ts.map +1 -1
  33. package/dist/utils/server-instructions/index.js +6 -7
  34. package/dist/utils/server-instructions/index.js.map +1 -1
  35. package/package.json +1 -1
  36. package/dist/tools/apps/search_actors.d.ts +0 -7
  37. package/dist/tools/apps/search_actors.d.ts.map +0 -1
  38. package/dist/tools/apps/search_actors.js +0 -90
  39. package/dist/tools/apps/search_actors.js.map +0 -1
  40. package/dist/tools/apps/search_actors_internal.d.ts +0 -3
  41. package/dist/tools/apps/search_actors_internal.d.ts.map +0 -1
  42. package/dist/tools/apps/search_actors_internal.js +0 -65
  43. package/dist/tools/apps/search_actors_internal.js.map +0 -1
@@ -3,13 +3,12 @@
3
3
  *
4
4
  * Apps-only sections (widget workflow, widget tool disambiguation) are included
5
5
  * only when the resolved server mode is `'apps'`. Default-mode clients never
6
- * see tool names like `search-actors-internal` or `fetch-actor-details-widget`,
6
+ * see widget tool names like `search-actors-widget` or `fetch-actor-details-widget`,
7
7
  * avoiding hallucinated calls to tools absent from `tools/list`.
8
8
  *
9
9
  * Note: the `-widget` suffix split is rolling out per-tool.
10
- * `fetch-actor-details-widget` is the first split; `call-actor`, `search-actors`,
11
- * and `get-actor-run` still render widgets on their base names until their own
12
- * splits land.
10
+ * `fetch-actor-details` and `search-actors` are already split; `call-actor` and
11
+ * `get-actor-run` still render widgets on their base names until their own splits land.
13
12
  */
14
13
  import { ServerMode } from '../../types.js';
15
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/server-instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,UAA+B,GAAG,MAAM,CA6DnF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/server-instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,UAA+B,GAAG,MAAM,CA6DnF"}
@@ -3,13 +3,12 @@
3
3
  *
4
4
  * Apps-only sections (widget workflow, widget tool disambiguation) are included
5
5
  * only when the resolved server mode is `'apps'`. Default-mode clients never
6
- * see tool names like `search-actors-internal` or `fetch-actor-details-widget`,
6
+ * see widget tool names like `search-actors-widget` or `fetch-actor-details-widget`,
7
7
  * avoiding hallucinated calls to tools absent from `tools/list`.
8
8
  *
9
9
  * Note: the `-widget` suffix split is rolling out per-tool.
10
- * `fetch-actor-details-widget` is the first split; `call-actor`, `search-actors`,
11
- * and `get-actor-run` still render widgets on their base names until their own
12
- * splits land.
10
+ * `fetch-actor-details` and `search-actors` are already split; `call-actor` and
11
+ * `get-actor-run` still render widgets on their base names until their own splits land.
13
12
  */
14
13
  import { HelperTools, RAG_WEB_BROWSER } from '../../const.js';
15
14
  import { ServerMode } from '../../types.js';
@@ -52,7 +51,7 @@ Some clients render widget-backed Actor tools: the response includes a live UI t
52
51
 
53
52
  - **Never call \`${HelperTools.ACTOR_RUNS_GET}\` after a widget-backed \`${HelperTools.ACTOR_CALL}\` response.** The widget renders live progress and polls itself — stop after the widget response and defer to it for run status.
54
53
  - When \`${HelperTools.ACTOR_CALL}\` runs without a widget (the tool response is plain text / structured data only), polling \`${HelperTools.ACTOR_RUNS_GET}\` for status is expected.
55
- - The \`-widget\` suffix split is rolling out per-tool (\`${HelperTools.ACTOR_GET_DETAILS_WIDGET}\` already split); until the rest split, widget rendering happens on the base \`${HelperTools.ACTOR_CALL}\`, \`${HelperTools.STORE_SEARCH}\`, and \`${HelperTools.ACTOR_RUNS_GET}\` tool names when the client supports it.
54
+ - The \`-widget\` suffix split is rolling out per-tool (\`${HelperTools.ACTOR_GET_DETAILS_WIDGET}\` and \`${HelperTools.STORE_SEARCH_WIDGET}\` already split); until the rest split, widget rendering happens on the base \`${HelperTools.ACTOR_CALL}\` and \`${HelperTools.ACTOR_RUNS_GET}\` tool names when the client supports it.
56
55
  ` : ''}
57
56
  ## Tool dependencies and disambiguation
58
57
 
@@ -71,9 +70,9 @@ Some clients render widget-backed Actor tools: the response includes a live UI t
71
70
  - **\`${HelperTools.STORE_SEARCH}\` vs \`${HelperTools.ACTOR_GET_DETAILS}\`:**
72
71
  \`${HelperTools.STORE_SEARCH}\` finds Actors; \`${HelperTools.ACTOR_GET_DETAILS}\` retrieves detailed info, README, and schema for a specific Actor.
73
72
  ${isApps ? `- **Data vs widget Actor tools (when the client supports widgets):**
74
- - \`${HelperTools.STORE_SEARCH_INTERNAL}\` is for silent name resolution; \`${HelperTools.STORE_SEARCH}\` renders an interactive UI element (widget) for user-facing discovery.
73
+ - \`${HelperTools.STORE_SEARCH}\` is a silent data lookup (Actor list for name resolution) with no UI; \`${HelperTools.STORE_SEARCH_WIDGET}\` renders an interactive UI element (widget) with Actor search results for the user to browse — use it only when the user explicitly asks to search or discover Actors.
75
74
  - \`${HelperTools.ACTOR_GET_DETAILS}\` is a silent data lookup (input schema, README, metadata) with no UI; \`${HelperTools.ACTOR_GET_DETAILS_WIDGET}\` renders an interactive UI element (widget) with Actor details — use it only when the user explicitly asks to see or browse the Actor.
76
- - When the next step is running an Actor, prefer silent lookups (\`${HelperTools.STORE_SEARCH_INTERNAL}\`, \`${HelperTools.ACTOR_GET_DETAILS}\`) over widget-backed variants.
75
+ - When the next step is running an Actor, prefer silent lookups (\`${HelperTools.STORE_SEARCH}\`, \`${HelperTools.ACTOR_GET_DETAILS}\`) over widget-backed variants.
77
76
  ` : ''}- **\`${HelperTools.STORE_SEARCH}\` vs ${RAG_WEB_BROWSER}:**
78
77
  \`${HelperTools.STORE_SEARCH}\` finds robust and reliable Actors for specific websites; ${RAG_WEB_BROWSER} is a general and versatile web scraping tool.
79
78
  - **Dedicated Actor tools (e.g. ${RAG_WEB_BROWSER}) vs \`${HelperTools.ACTOR_CALL}\`:**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sour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AAS,WAAW,CAAC,YAAY,SAAS,eAAe;MACzD,WAAW,CAAC,YAAY,8DAA8D,eAAe;kCACzE,eAAe,UAAU,WAAW,CAAC,UAAU;iDAChC,WAAW,CAAC,UAAU;CACtE,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/actors-mcp-server",
3
- "version": "0.9.21-beta.1",
3
+ "version": "0.9.21-beta.2",
4
4
  "type": "module",
5
5
  "description": "Apify MCP Server",
6
6
  "mcpName": "com.apify/apify-mcp-server",
@@ -1,7 +0,0 @@
1
- import type { ToolEntry } from '../../types.js';
2
- /**
3
- * Apps mode search-actors tool.
4
- * Returns widget-formatted actors with interactive widget metadata.
5
- */
6
- export declare const appsSearchActors: ToolEntry;
7
- //# sourceMappingURL=search_actors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search_actors.d.ts","sourceRoot":"","sources":["../../../src/tools/apps/search_actors.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAOlE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAuFpB,CAAC"}
@@ -1,90 +0,0 @@
1
- import dedent from 'dedent';
2
- import { HelperTools } from '../../const.js';
3
- import { getWidgetConfig, WIDGET_URIS } from '../../resources/widgets.js';
4
- import { formatActorForWidget } from '../../utils/actor_card.js';
5
- import { searchAndFilterActors } from '../../utils/actor_search.js';
6
- import { buildMCPResponse } from '../../utils/mcp.js';
7
- import { getUserInfoCached } from '../../utils/userid_cache.js';
8
- import { buildSearchActorsEmptyResponse, buildSearchActorsResult, searchActorsArgsSchema, searchActorsMetadata } from '../core/search_actors_common.js';
9
- /**
10
- * Apps mode search-actors tool.
11
- * Returns widget-formatted actors with interactive widget metadata.
12
- */
13
- export const appsSearchActors = Object.freeze({
14
- ...searchActorsMetadata,
15
- call: async (toolArgs) => {
16
- const { args, apifyToken, apifyClient, userRentedActorIds, apifyMcpServer } = toolArgs;
17
- const parsed = searchActorsArgsSchema.parse(args);
18
- // Actor search and user-info fetch are independent; run in parallel to avoid a
19
- // sequential round-trip on cache miss.
20
- const [actors, { userPlanTier }] = await Promise.all([
21
- searchAndFilterActors({
22
- keywords: parsed.keywords,
23
- apifyToken,
24
- limit: parsed.limit,
25
- offset: parsed.offset,
26
- paymentProvider: apifyMcpServer.options.paymentProvider,
27
- userRentedActorIds,
28
- }),
29
- getUserInfoCached(apifyToken, apifyClient),
30
- ]);
31
- if (actors.length === 0) {
32
- return buildSearchActorsEmptyResponse(parsed.keywords);
33
- }
34
- const { actorCardText, actorCardStructured } = buildSearchActorsResult(actors, userPlanTier);
35
- const structuredContent = {
36
- actors: actorCardStructured,
37
- query: parsed.keywords,
38
- count: actors.length,
39
- instructions: dedent `
40
- Choosing the right details tool: Use ${HelperTools.ACTOR_GET_DETAILS_WIDGET} when the user
41
- wants to see or browse Actor details — it renders an interactive UI element (widget) for the user
42
- (e.g., "show me", "tell me about this Actor").
43
- Use ${HelperTools.ACTOR_GET_DETAILS} for silent data lookups (input schema, README, metadata)
44
- when preparing an Actor run or making a decision (e.g., "scrape", "extract") — no UI is rendered.
45
- IMPORTANT: You MUST always do a second search with broader, more generic keywords
46
- (e.g., just the platform name like "TikTok" instead of "TikTok posts") to make sure
47
- you haven't missed a better Actor.
48
- `,
49
- };
50
- // Add widget-formatted actors for the interactive UI
51
- structuredContent.widgetActors = actors.map((actor) => formatActorForWidget(actor, userPlanTier));
52
- const texts = [dedent `
53
- # Search results:
54
- - **Search query:** ${parsed.keywords}
55
- - **Number of Actors found:** ${actors.length}
56
-
57
- An interactive widget has been rendered with the search results. The user can already see
58
- the list of Actors visually in the widget, so do NOT print or summarize the Actor list
59
- in your response.
60
-
61
- # Actors:
62
-
63
- ${actorCardText}
64
-
65
- ## Choosing the right details tool:
66
- - Use ${HelperTools.ACTOR_GET_DETAILS_WIDGET} when the user wants to **see or browse**
67
- an Actor (e.g., "show me apify/rag-web-browser", "tell me about this Actor"). This renders
68
- an **interactive UI element (widget)** the user can view directly.
69
- - Use ${HelperTools.ACTOR_GET_DETAILS} for **silent data lookups** — fetching the input
70
- schema to prepare a run, reading the README for decision making, or inspecting metadata
71
- (e.g., "scrape Google Maps for restaurants", "extract emails from this website"). No UI
72
- is rendered.
73
-
74
- IMPORTANT: You MUST always do a second search with broader, more generic keywords
75
- (e.g., just the platform name like "TikTok" instead of "TikTok posts") to make sure
76
- you haven't missed a better Actor.
77
- `];
78
- const widgetConfig = getWidgetConfig(WIDGET_URIS.SEARCH_ACTORS);
79
- return buildMCPResponse({
80
- texts,
81
- structuredContent,
82
- // Response-level meta; only returned in apps mode (this handler is apps-only)
83
- _meta: {
84
- ...widgetConfig === null || widgetConfig === void 0 ? void 0 : widgetConfig.meta,
85
- 'openai/widgetDescription': `Interactive actor search results showing ${actors.length} actors from Apify Store`,
86
- },
87
- });
88
- },
89
- });
90
- //# sourceMappingURL=search_actors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search_actors.js","sourceRoot":"","sources":["../../../src/tools/apps/search_actors.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAExJ;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAc,MAAM,CAAC,MAAM,CAAC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E,YAAY,CAAC,CAAC,CAAC;QAElG,MAAM,KAAK,GAAG,CAAC,MAAM,CAAA;;kCAEK,MAAM,CAAC,QAAQ;4CACL,MAAM,CAAC,MAAM;;;;;;;;cAQ3C,aAAa;;;oBAGP,WAAW,CAAC,wBAAwB;;;oBAGpC,WAAW,CAAC,iBAAiB;;;;;;;;SAQxC,CAAC,CAAC;QAEH,MAAM,YAAY,GAAG,eAAe,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QAChE,OAAO,gBAAgB,CAAC;YACpB,KAAK;YACL,iBAAiB;YACjB,8EAA8E;YAC9E,KAAK,EAAE;gBACH,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI;gBACrB,0BAA0B,EAAE,4CAA4C,MAAM,CAAC,MAAM,0BAA0B;aAClH;SACJ,CAAC,CAAC;IACP,CAAC;CACK,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { ToolEntry } from '../../types.js';
2
- export declare const searchActorsInternalTool: ToolEntry;
3
- //# sourceMappingURL=search_actors_internal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search_actors_internal.d.ts","sourceRoot":"","sources":["../../../src/tools/apps/search_actors_internal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AASnF,eAAO,MAAM,wBAAwB,EAAE,SAwDrC,CAAC"}
@@ -1,65 +0,0 @@
1
- import dedent from 'dedent';
2
- import { z } from 'zod';
3
- import { HelperTools } from '../../const.js';
4
- import { searchAndFilterActors } from '../../utils/actor_search.js';
5
- import { compileSchema } from '../../utils/ajv.js';
6
- import { buildMCPResponse } from '../../utils/mcp.js';
7
- import { searchActorsBaseArgsSchema } from '../core/search_actors_common.js';
8
- import { actorSearchInternalOutputSchema } from '../structured_output_schemas.js';
9
- const searchActorsInternalInputSchema = z.toJSONSchema(searchActorsBaseArgsSchema);
10
- export const searchActorsInternalTool = Object.freeze({
11
- type: 'internal',
12
- name: HelperTools.STORE_SEARCH_INTERNAL,
13
- description: dedent `
14
- Search Actors internally (apps mode internal tool).
15
-
16
- This tool is available because the LLM is operating in apps mode. Use it for internal lookups
17
- where data presentation to the user is NOT needed - this tool does NOT render a widget.
18
-
19
- Use this instead of ${HelperTools.STORE_SEARCH} when you need to find an Actor but the user
20
- did NOT explicitly ask to search Actors. For example, when user says "scrape me google maps"
21
- and you need to find the right Actor for the task, then fetch its schema and call it.
22
-
23
- Returns only minimal fields (fullName, title, description) needed for subsequent calls.
24
- `,
25
- inputSchema: searchActorsInternalInputSchema,
26
- outputSchema: actorSearchInternalOutputSchema,
27
- ajvValidate: compileSchema(searchActorsInternalInputSchema),
28
- annotations: {
29
- title: 'Search Actors (internal)',
30
- readOnlyHint: true,
31
- destructiveHint: false,
32
- idempotentHint: true,
33
- openWorldHint: false,
34
- },
35
- call: async (toolArgs) => {
36
- const { args, apifyToken, userRentedActorIds, apifyMcpServer } = toolArgs;
37
- const parsed = searchActorsBaseArgsSchema.parse(args);
38
- const actors = await searchAndFilterActors({
39
- keywords: parsed.keywords,
40
- apifyToken,
41
- limit: parsed.limit,
42
- offset: parsed.offset,
43
- paymentProvider: apifyMcpServer.options.paymentProvider,
44
- userRentedActorIds,
45
- });
46
- const minimalActors = actors.map((actor) => ({
47
- fullName: `${actor.username}/${actor.name}`,
48
- title: actor.title || actor.name,
49
- description: actor.description || '',
50
- }));
51
- return buildMCPResponse({
52
- texts: [
53
- `Found ${minimalActors.length} Actors for "${parsed.keywords}".`,
54
- `Query: ${parsed.keywords}`,
55
- `Actors:\n\`\`\`json\n${JSON.stringify(minimalActors)}\n\`\`\``,
56
- ],
57
- structuredContent: {
58
- actors: minimalActors,
59
- query: parsed.keywords,
60
- count: minimalActors.length,
61
- },
62
- });
63
- },
64
- });
65
- //# sourceMappingURL=search_actors_internal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search_actors_internal.js","sourceRoot":"","sources":["../../../src/tools/apps/search_actors_internal.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