@apify/actors-mcp-server 0.19.6-beta.2 → 0.19.6-beta.3

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 (101) hide show
  1. package/README.md +4 -0
  2. package/dist/apify_client.d.ts +6 -0
  3. package/dist/apify_client.d.ts.map +1 -1
  4. package/dist/apify_client.js +12 -1
  5. package/dist/apify_client.js.map +1 -1
  6. package/dist/const.d.ts +2 -0
  7. package/dist/const.d.ts.map +1 -1
  8. package/dist/const.js +2 -0
  9. package/dist/const.js.map +1 -1
  10. package/dist/index_internals.d.ts +2 -0
  11. package/dist/index_internals.d.ts.map +1 -1
  12. package/dist/index_internals_test_kit.d.ts +1 -2
  13. package/dist/index_internals_test_kit.d.ts.map +1 -1
  14. package/dist/index_internals_test_kit.js +1 -2
  15. package/dist/index_internals_test_kit.js.map +1 -1
  16. package/dist/mcp/client.d.ts +6 -1
  17. package/dist/mcp/client.d.ts.map +1 -1
  18. package/dist/mcp/client.js +15 -12
  19. package/dist/mcp/client.js.map +1 -1
  20. package/dist/mcp/remote_tool_call.d.ts +2 -1
  21. package/dist/mcp/remote_tool_call.d.ts.map +1 -1
  22. package/dist/mcp/remote_tool_call.js +6 -6
  23. package/dist/mcp/remote_tool_call.js.map +1 -1
  24. package/dist/mcp/server.d.ts.map +1 -1
  25. package/dist/mcp/server.js +4 -2
  26. package/dist/mcp/server.js.map +1 -1
  27. package/dist/mcp/tool_call_engine.d.ts +4 -1
  28. package/dist/mcp/tool_call_engine.d.ts.map +1 -1
  29. package/dist/mcp/tool_call_engine.js +17 -18
  30. package/dist/mcp/tool_call_engine.js.map +1 -1
  31. package/dist/mcp/tool_dispatch.js +1 -1
  32. package/dist/mcp/tool_dispatch.js.map +1 -1
  33. package/dist/test_kit/cases/actors.cases.d.ts.map +1 -1
  34. package/dist/test_kit/cases/actors.cases.js +15 -78
  35. package/dist/test_kit/cases/actors.cases.js.map +1 -1
  36. package/dist/test_kit/cases/payments.cases.d.ts.map +1 -1
  37. package/dist/test_kit/cases/payments.cases.js +19 -12
  38. package/dist/test_kit/cases/payments.cases.js.map +1 -1
  39. package/dist/test_kit/cases/registration.cases.d.ts.map +1 -1
  40. package/dist/test_kit/cases/registration.cases.js +8 -2
  41. package/dist/test_kit/cases/registration.cases.js.map +1 -1
  42. package/dist/test_kit/cases/tools.cases.d.ts.map +1 -1
  43. package/dist/test_kit/cases/tools.cases.js +23 -29
  44. package/dist/test_kit/cases/tools.cases.js.map +1 -1
  45. package/dist/test_kit/tsconfig.tsbuildinfo +1 -1
  46. package/dist/tools/actors/actor_tools_factory.d.ts +5 -2
  47. package/dist/tools/actors/actor_tools_factory.d.ts.map +1 -1
  48. package/dist/tools/actors/actor_tools_factory.js +10 -6
  49. package/dist/tools/actors/actor_tools_factory.js.map +1 -1
  50. package/dist/tools/actors/call_actor.d.ts +10 -38
  51. package/dist/tools/actors/call_actor.d.ts.map +1 -1
  52. package/dist/tools/actors/call_actor.js +59 -145
  53. package/dist/tools/actors/call_actor.js.map +1 -1
  54. package/dist/tools/actors/call_actor_mcp_tool.d.ts +20 -0
  55. package/dist/tools/actors/call_actor_mcp_tool.d.ts.map +1 -0
  56. package/dist/tools/actors/call_actor_mcp_tool.js +150 -0
  57. package/dist/tools/actors/call_actor_mcp_tool.js.map +1 -0
  58. package/dist/tools/actors/fetch_actor_details.d.ts +2 -9
  59. package/dist/tools/actors/fetch_actor_details.d.ts.map +1 -1
  60. package/dist/tools/actors/fetch_actor_details.js +13 -26
  61. package/dist/tools/actors/fetch_actor_details.js.map +1 -1
  62. package/dist/tools/actors/fetch_actor_mcp_tool_list.d.ts +8 -0
  63. package/dist/tools/actors/fetch_actor_mcp_tool_list.d.ts.map +1 -0
  64. package/dist/tools/actors/fetch_actor_mcp_tool_list.js +83 -0
  65. package/dist/tools/actors/fetch_actor_mcp_tool_list.js.map +1 -0
  66. package/dist/tools/actors/send_server_actor_request.d.ts.map +1 -1
  67. package/dist/tools/actors/send_server_actor_request.js +4 -6
  68. package/dist/tools/actors/send_server_actor_request.js.map +1 -1
  69. package/dist/tools/registry.d.ts.map +1 -1
  70. package/dist/tools/registry.js +3 -1
  71. package/dist/tools/registry.js.map +1 -1
  72. package/dist/tools/structured_output_schemas.d.ts +12 -2
  73. package/dist/tools/structured_output_schemas.d.ts.map +1 -1
  74. package/dist/tools/structured_output_schemas.js +12 -4
  75. package/dist/tools/structured_output_schemas.js.map +1 -1
  76. package/dist/tools/versions/source_helpers.d.ts +1 -1
  77. package/dist/tools/widgets/call_actor_widget.d.ts.map +1 -1
  78. package/dist/tools/widgets/call_actor_widget.js +6 -18
  79. package/dist/tools/widgets/call_actor_widget.js.map +1 -1
  80. package/dist/tsconfig.tsbuildinfo +1 -1
  81. package/dist/types.d.ts +2 -8
  82. package/dist/types.d.ts.map +1 -1
  83. package/dist/types.js.map +1 -1
  84. package/dist/utils/actor.d.ts +3 -6
  85. package/dist/utils/actor.d.ts.map +1 -1
  86. package/dist/utils/actor.js +10 -23
  87. package/dist/utils/actor.js.map +1 -1
  88. package/dist/utils/actor_details.d.ts +0 -6
  89. package/dist/utils/actor_details.d.ts.map +1 -1
  90. package/dist/utils/actor_details.js +0 -56
  91. package/dist/utils/actor_details.js.map +1 -1
  92. package/dist/utils/apify_errors.d.ts.map +1 -1
  93. package/dist/utils/apify_errors.js +19 -1
  94. package/dist/utils/apify_errors.js.map +1 -1
  95. package/dist/utils/server-instructions/index.d.ts.map +1 -1
  96. package/dist/utils/server-instructions/index.js +0 -1
  97. package/dist/utils/server-instructions/index.js.map +1 -1
  98. package/dist/utils/tools.d.ts.map +1 -1
  99. package/dist/utils/tools.js +1 -3
  100. package/dist/utils/tools.js.map +1 -1
  101. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import type { ApifyClient } from '../../apify_client.js';
2
2
  import { ActorLoadError } from '../../errors.js';
3
3
  import type { PaymentProvider } from '../../payments/types.js';
4
- import { type ActorInfo, type ActorStore, type ApifyToken, type ToolEntry } from '../../types.js';
4
+ import { type ActorInfo, type ActorStore, type ToolEntry } from '../../types.js';
5
5
  /**
6
6
  * For each direct actor tool with a known historical item schema, replaces the generic
7
7
  * `actorRunOutputSchema` with a per-tool variant that declares
@@ -33,18 +33,21 @@ export declare function getNormalActorsAsTools(actorsInfo: ActorInfo[], options?
33
33
  actorStore?: ActorStore;
34
34
  isDirectTool?: boolean;
35
35
  }): Promise<ToolEntry[]>;
36
- export declare function getMCPServersAsTools(actorsInfo: ActorInfo[], apifyToken: ApifyToken, mcpSessionId?: string): Promise<ToolEntry[]>;
36
+ export declare function getMCPServersAsTools(actorsInfo: ActorInfo[], apifyClient: Pick<ApifyClient, 'token' | 'requestOrigin'>, mcpSessionId?: string): Promise<ToolEntry[]>;
37
37
  /**
38
38
  * Fixes an Actor name input from LLM and logs at INFO when the input differed from the fixed version.
39
39
  * Single entry point for fix+log — avoids duplicating the pattern at every call site.
40
40
  */
41
41
  export declare function fixActorNameInputAndLog(actorName: string, extra?: Record<string, unknown>): string;
42
+ /** The `:toolName` of the removed `actorName:toolName` form; a URL's `scheme://` is not one. */
43
+ export declare const MCP_TOOL_NAME_SUFFIX: RegExp;
42
44
  /**
43
45
  * Fixes Actor name strings (`username/name`) before cache + Apify API lookup.
44
46
  *
45
47
  * LLMs often wrap values in markdown quotes or smart quotes and insert spaces around `/`.
46
48
  * The Apify API treats those as distinct strings → avoidable 404 SOFT_FAIL. This only trims
47
49
  * and strips common wrappers / spacing noise; valid names pass through unchanged.
50
+ * It also drops the `:toolName` of the removed `actorName:toolName` form, since a name never contains a colon.
48
51
  */
49
52
  export declare function fixActorNameInput(actorName: string): string;
50
53
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"actor_tools_factory.d.ts","sourceRoot":"","sources":["../../../src/tools/actors/actor_tools_factory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAQzD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,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AAC,GAAG,MAAM,CAalG;AAED,gGAAgG;AAChG,eAAO,MAAM,oBAAoB,QAAY,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,MAAM,EAAE,cAAc,EAAE,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAClC,eAAe,EAAE,MAAM,EAAE,EACzB,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE;IACN,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,GACF,OAAO,CAAC,mBAAmB,CAAC,CAmF9B"}
@@ -184,10 +184,11 @@ ${hasTool(HELPER_TOOLS.ACTOR_CALL) ? `Use this tool instead of the "${HELPER_TOO
184
184
  }
185
185
  return tools;
186
186
  }
187
- export async function getMCPServersAsTools(actorsInfo, apifyToken, mcpSessionId) {
187
+ export async function getMCPServersAsTools(actorsInfo, apifyClient, mcpSessionId) {
188
+ const { token, requestOrigin } = apifyClient;
188
189
  // Payment-provider request with no Apify token: standby Actors aren't supported here, so
189
190
  // MCP servers — which are always standby Actors — are skipped since they'd fail anyway.
190
- if (apifyToken === null || apifyToken === undefined) {
191
+ if (token === null || token === undefined) {
191
192
  return [];
192
193
  }
193
194
  // Process all actors in parallel
@@ -212,7 +213,7 @@ export async function getMCPServersAsTools(actorsInfo, apifyToken, mcpSessionId)
212
213
  mcpServerUrl,
213
214
  mcpSessionId,
214
215
  });
215
- client = await connectMCPClient(mcpServerUrl, apifyToken, mcpSessionId);
216
+ client = await connectMCPClient(mcpServerUrl, { token, requestOrigin }, mcpSessionId);
216
217
  if (!client) {
217
218
  // Skip this Actor, connectMCPClient will log the error
218
219
  return [];
@@ -243,7 +244,7 @@ export async function getMCPServersAsTools(actorsInfo, apifyToken, mcpSessionId)
243
244
  export function fixActorNameInputAndLog(actorName, extra) {
244
245
  const fixed = fixActorNameInput(actorName);
245
246
  if (fixed !== actorName) {
246
- log.info('Actor name input required normalization before lookup (quotes, spacing, or slash padding)', {
247
+ log.info('Actor name input required normalization before lookup (quotes, spacing, slash padding, or a tool name)', {
247
248
  actorNameInput: actorName,
248
249
  actorNameFixed: fixed,
249
250
  ...extra,
@@ -251,16 +252,19 @@ export function fixActorNameInputAndLog(actorName, extra) {
251
252
  }
252
253
  return fixed;
253
254
  }
255
+ /** The `:toolName` of the removed `actorName:toolName` form; a URL's `scheme://` is not one. */
256
+ export const MCP_TOOL_NAME_SUFFIX = /:[^/]*$/;
254
257
  /**
255
258
  * Fixes Actor name strings (`username/name`) before cache + Apify API lookup.
256
259
  *
257
260
  * LLMs often wrap values in markdown quotes or smart quotes and insert spaces around `/`.
258
261
  * The Apify API treats those as distinct strings → avoidable 404 SOFT_FAIL. This only trims
259
262
  * and strips common wrappers / spacing noise; valid names pass through unchanged.
263
+ * It also drops the `:toolName` of the removed `actorName:toolName` form, since a name never contains a colon.
260
264
  */
261
265
  export function fixActorNameInput(actorName) {
262
266
  const s = stripQuoteWrappers(actorName).replace(/\s*\/\s*/g, '/');
263
- return s.replace(/\s+/g, ' ').trim();
267
+ return s.replace(/\s+/g, ' ').trim().replace(MCP_TOOL_NAME_SUFFIX, '');
264
268
  }
265
269
  /**
266
270
  * Loads Actor metadata + builds MCP tool entries for the requested Actor
@@ -347,7 +351,7 @@ export async function getActorsAsTools(actorIdsOrNames, apifyClient, options) {
347
351
  }
348
352
  const [normalTools, mcpServerTools] = await Promise.all([
349
353
  getNormalActorsAsTools(normalActorsInfo, { mcpSessionId, actorStore, isDirectTool }),
350
- getMCPServersAsTools(actorMCPServersInfo, apifyClient.token, mcpSessionId),
354
+ getMCPServersAsTools(actorMCPServersInfo, apifyClient, mcpSessionId),
351
355
  ]);
352
356
  return { tools: [...normalTools, ...mcpServerTools], errors };
353
357
  }
@@ -1 +1 @@
1
- {"version":3,"file":"actor_tools_factory.js","sourceRoot":"","sources":["../../../src/tools/actors/actor_tools_factory.ts"],"names":[],"mappings":"AAEA,OAAO,GAAG,MAAM,YAAY,CAAC;AAG7B,OAAO,EACH,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACZ,iCAAiC,EACjC,wBAAwB,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EASH,eAAe,EACf,iBAAiB,EACjB,SAAS,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,kCAAkC,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACxH,OAAO,EAAE,oCAAoC,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,4BAA4B,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAExF;;;;GAIG;AACH,MAAM,wBA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,CAAC,SAAS,CAAC,CAAC;;YACrE,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpD,sBAAsB,CAAC,gBAAgB,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;QACpF,oBAAoB,CAAC,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;KACvE,CAAC,CAAC;IAEH,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,EAAE,GAAG,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;AAClE,CAAC"}
@@ -2,9 +2,6 @@ import { z } from 'zod';
2
2
  import type { PaymentProvider } from '../../payments/types.js';
3
3
  import type { ApifyToken, InternalToolArgs, ToolDescriptionContext, ToolEntry, ToolInputSchema } from '../../types.js';
4
4
  import { type ToolResponse } from '../../utils/mcp.js';
5
- export declare const CALL_ACTOR_MCP_MISSING_TOOL_NAME_MSG = "When calling an MCP server Actor, you must specify the tool name in the actor parameter as \"{actorName}:{toolName}\" in the \"actor\" input property.";
6
- /** Shared MCP server instructions — identical in both modes. */
7
- export declare function buildCallActorMcpServerSection({ hasTool }: ToolDescriptionContext): string;
8
5
  /** Shared examples section — identical in both modes. */
9
6
  export declare const CALL_ACTOR_EXAMPLES_SECTION = "EXAMPLES:\n- user_input: Get instagram posts using apify/instagram-scraper";
10
7
  type CallActorErrorResponseParams = {
@@ -58,32 +55,14 @@ export type CallActorParsedArgs = z.infer<typeof callActorArgs>;
58
55
  * Uses `actorDefinitionCache` — one definition fetch on a cold cache.
59
56
  */
60
57
  export declare function checkPaymentProviderStandbyConflict(params: {
61
- actorName: string;
62
- paymentProvider: PaymentProvider;
58
+ tool: ToolEntry;
59
+ args: Record<string, unknown>;
60
+ paymentProvider: PaymentProvider | undefined;
63
61
  apifyToken: ApifyToken;
64
62
  mcpSessionId?: string;
65
63
  }): Promise<Record<string, unknown> | null>;
66
- /**
67
- * Resolves MCP URL and parses the "actor:tool" format.
68
- * Shared pre-processing step used by both default and apps variants.
69
- */
70
- export declare function resolveActorContext(actorName: string): {
71
- baseActorName: string;
72
- mcpToolName: string | undefined;
73
- };
74
- /**
75
- * Proxies the MCP tool call flow (when actorName contains ":toolName"). The caller routes here only
76
- * for {@link ACTOR_TOOL_MODE.MCP} Actors, so `mcpServerUrl` is always known good.
77
- */
78
- export declare function handleMcpToolCall(params: {
79
- baseActorName: string;
80
- mcpToolName: string;
81
- input: Record<string, unknown>;
82
- mcpServerUrl: string;
83
- apifyToken: string;
84
- mcpSessionId?: string;
85
- signal: AbortSignal;
86
- }): Promise<ToolResponse>;
64
+ /** Rejects removed MCP call syntax before Actor or payment metadata is fetched. */
65
+ export declare function buildLegacyMcpSyntaxRejection(toolName: string, actor: unknown, loadedToolNames: readonly string[]): ToolResponse | null;
87
66
  /**
88
67
  * Validates the actor and its input, returning the resolved actor tool or an error response.
89
68
  * Shared validation logic used by both default and openai execution paths.
@@ -98,17 +77,12 @@ export declare function resolveAndValidateActor(params: {
98
77
  actor: ToolEntry;
99
78
  }>;
100
79
  /**
101
- * Performs the pre-execution checks common to both modes:
102
- * - Parses args
103
- * - Resolves actor/MCP context
104
- * - Handles payment provider restrictions
105
- * - Handles MCP tool calls
106
- *
107
- * Returns either an early response (error or MCP tool result) or the parsed context for mode-specific execution.
80
+ * Performs the pre-execution checks common to both modes: parses args and rejects an Actor that `call-actor`
81
+ * cannot run (a standby Actor with neither an MCP server nor an input schema, or an MCP server).
108
82
  *
109
- * Applies the same `actor` string normalization as `getActorsAsTools` **before** MCP URL lookup and routing so
110
- * clients cannot pass a clean-enough id for definition fetch but a dirty id to `apifyClient.actor()` (see Mezmo:
111
- * e.g. trailing `` ` `` on `apify/rag-web-browser`).
83
+ * Applies the same `actor` string normalization as `getActorsAsTools` **before** routing so clients cannot pass a
84
+ * clean-enough id for definition fetch but a dirty id to `apifyClient.actor()` (see Mezmo: e.g. trailing `` ` ``
85
+ * on `apify/rag-web-browser`).
112
86
  */
113
87
  export declare function callActorPreExecute(toolArgs: InternalToolArgs, options: {
114
88
  route: string;
@@ -116,8 +90,6 @@ export declare function callActorPreExecute(toolArgs: InternalToolArgs, options:
116
90
  earlyResponse: ToolResponse;
117
91
  } | {
118
92
  parsed: CallActorParsedArgs;
119
- baseActorName: string;
120
- mcpToolName: string | undefined;
121
93
  }>;
122
94
  /**
123
95
  * Shared start-then-wait flow for call-actor variants (default + apps).
@@ -1 +1 @@
1
- {"version":3,"file":"call_actor.d.ts","sourceRoot":"","sources":["../../../src/tools/actors/call_actor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAevH,OAAO,EAMH,KAAK,YAAY,EACpB,MAAM,oBAAoB,CAAC;AAmB5B,eAAO,MAAM,oCAAoC,2JAAuJ,CAAC;AAEzM,gEAAgE;AAChE,wBAAgB,8BAA8B,CAAC,EAAE,OAAO,EAAE,EAAE,sBAAsB,GAAG,MAAM,CAG1F;AAuBD,yDAAyD;AACzD,eAAO,MAAM,2BAA2B,+EACwB,CAAC;AAEjE,KAAK,4BAA4B,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,6FAA6F;IAC7F,WAAW,CAAC,EAAE,eAAe,CAAC;CACjC,CAAC;AA+BF,wBAAgB,yBAAyB,CAAC,GAAG,GAAE,sBAA0C,GAAG,MAA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IAC/B,QAAQ,EAAE,gBAAgB,CAAC;CAC9B,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC,CA2E1D;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACrC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3B,OAAO,CAAC;IAAE,aAAa,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,mBAAmB,CAAA;CAAE,CAAC,CA0B5E;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAiFxF;AAED,8IAA8I;AAC9I,eAAO,MAAM,SAAS,EAAE,SAsBb,CAAC"}
@@ -1,37 +1,28 @@
1
- import { CallToolResultSchema } from '@modelcontextprotocol/sdk/types.js';
2
1
  import dedent from 'dedent';
3
2
  import { z } from 'zod';
4
3
  import log from '@apify/log';
5
4
  import { ApifyClient } from '../../apify_client.js';
6
5
  import { APIFY_ERROR_TYPE_CANNOT_START_ACTOR_RUNS, APIFY_ERROR_TYPE_FULL_PERMISSION_NOT_APPROVED, APIFY_ERROR_TYPE_MEMORY_LIMIT_EXCEEDED, FAILURE_CATEGORY, HELPER_TOOLS, } from '../../const.js';
7
6
  import { ACTOR_LOAD_ERROR_KIND, ActorLoadError } from '../../errors.js';
8
- import { EXTERNAL_TOOL_CALL_TIMEOUT_MSEC } from '../../mcp/const.js';
9
- import { withRemoteMcpClient } from '../../mcp/remote_tool_call.js';
10
7
  import { ACTOR_TOOL_MODE, ALL_TOOLS_PRESENT, TOOL_TYPE } from '../../types.js';
11
8
  import { getActorDefinitionCached, getActorToolResolutionCached } from '../../utils/actor.js';
12
9
  import { compileSchema } from '../../utils/ajv.js';
13
- import { ACTOR_RUN_LIMIT_MESSAGE, isActorInputValidationError, isActorRunLimitError, isMemoryQuotaError, isPermissionApprovalError, remoteMcpFailureDetail, } from '../../utils/apify_errors.js';
10
+ import { ACTOR_RUN_LIMIT_MESSAGE, isActorInputValidationError, isActorRunLimitError, isMemoryQuotaError, isPermissionApprovalError, } from '../../utils/apify_errors.js';
14
11
  import { getConsoleLinkContext } from '../../utils/console_link.js';
15
12
  import { wrapJsonText } from '../../utils/encode_text.js';
16
13
  import { logHttpError } from '../../utils/logging.js';
17
- import { buildInvalidInputTexts, respondAborted, respondRaw, respondServerError, respondUserError, } from '../../utils/mcp.js';
14
+ import { buildInvalidInputTexts, respondAborted, respondServerError, respondUserError, } from '../../utils/mcp.js';
18
15
  import { buildPermissionApprovalTexts } from '../../utils/payment_errors.js';
19
16
  import { classifyFailureCategory, extractAjvErrorDetails } from '../../utils/tool_status.js';
20
17
  import { extractActorId } from '../../utils/tools.js';
21
- import { isActorBlockedUnderPaymentProvider } from '../actor_tool_naming.js';
18
+ import { getOwnServerRemedy, isActorBlockedUnderPaymentProvider } from '../actor_tool_naming.js';
22
19
  import { buildGetActorRunResponse } from '../runs/get_actor_run.js';
23
20
  import { actorRunOutputSchema, anyJsonObjectSchema } from '../structured_output_schemas.js';
24
21
  import { abortRunOnSignal, buildStartRunResponse, CALL_ACTOR_WAIT_SECS_DEFAULT, fetchActorRunData, } from './actor_run_response.js';
25
- import { fixActorNameInputAndLog, getActorsAsTools } from './actor_tools_factory.js';
22
+ import { fixActorNameInputAndLog, getActorsAsTools, MCP_TOOL_NAME_SUFFIX } from './actor_tools_factory.js';
26
23
  // ---------------------------------------------------------------------------
27
24
  // Shared call-actor description building blocks
28
25
  // ---------------------------------------------------------------------------
29
- export const CALL_ACTOR_MCP_MISSING_TOOL_NAME_MSG = `When calling an MCP server Actor, you must specify the tool name in the actor parameter as "{actorName}:{toolName}" in the "actor" input property.`;
30
- /** Shared MCP server instructions — identical in both modes. */
31
- export function buildCallActorMcpServerSection({ hasTool }) {
32
- return `For MCP server Actors:
33
- ${hasTool(HELPER_TOOLS.ACTOR_GET_DETAILS) ? `- Use ${HELPER_TOOLS.ACTOR_GET_DETAILS} with output={ mcpTools: true } to list available tools\n` : ''}- Call using format: "actorName:toolName" (e.g., "username/name:tool-name")`;
34
- }
35
26
  /** Points at the Actor Server for results that do not need a batch run. */
36
27
  function buildCallActorServerActorSection({ hasTool }) {
37
28
  const operations = hasTool(HELPER_TOOLS.ACTOR_GET_DETAILS)
@@ -101,7 +92,7 @@ export function buildCallActorDescription(ctx = ALL_TOOLS_PRESENT) {
101
92
  const sections = [
102
93
  'Call any Actor from the Apify Store.',
103
94
  workflowSection,
104
- buildCallActorMcpServerSection(ctx),
95
+ `MCP server Actors are not run here${hasTool(HELPER_TOOLS.ACTOR_MCP_TOOL_CALL) ? `; ${HELPER_TOOLS.ACTOR_MCP_TOOL_CALL} calls their MCP tools` : ''}.`,
105
96
  ...(hasTool(HELPER_TOOLS.ACTOR_SERVER_REQUEST) ? [buildCallActorServerActorSection(ctx)] : []),
106
97
  dedent `
107
98
  IMPORTANT:
@@ -126,8 +117,8 @@ export function buildCallActorDescription(ctx = ALL_TOOLS_PRESENT) {
126
117
  */
127
118
  function respondStandbyRejection(error, opts) {
128
119
  log.softFail('Rejecting a tool call for an unsupported standby Actor', {
129
- // The error's canonical Actor name, so both call shapes log the same value even when the
130
- // caller addressed the Actor by ID. `actorLoadErrorKind` distinguishes which cell rejected it.
120
+ // The error's canonical Actor name, not the caller's identifier, which may be an Actor ID.
121
+ // `actorLoadErrorKind` distinguishes which cell rejected it.
131
122
  actorName: error.actorName,
132
123
  mcpSessionId: opts.mcpSessionId,
133
124
  paymentProviderId: opts.paymentProviderId,
@@ -136,10 +127,7 @@ function respondStandbyRejection(error, opts) {
136
127
  });
137
128
  return respondUserError(error.message, { actorId: opts.actorId, detail: error.kind });
138
129
  }
139
- /**
140
- * Canonical "Actor not found" answer, shared by the run path and the `actor:toolName` route so an
141
- * unknown Actor gets the same response regardless of call shape.
142
- */
130
+ /** Canonical "Actor not found" answer for the run path. */
143
131
  function respondActorNotFound(actorName, loadedToolNames) {
144
132
  // See apify/apify-mcp-server#1296.
145
133
  // Only search-actors: the Actor does not exist, so buildCallFailureRecoveryHint's second
@@ -237,11 +225,9 @@ export const callOptionsSchema = z.object({
237
225
  });
238
226
  /** Zod schema for call-actor arguments — shared between default and apps variants. */
239
227
  export const callActorArgs = z.object({
240
- actor: z.string().describe(dedent `
241
- The Actor to call: its ID, or its name in the "username/name" form (e.g., "apify/rag-web-browser").
242
-
243
- For MCP server Actors, use format "actorName:toolName" to call a specific tool (e.g., "username/name:tool-name").
244
- `),
228
+ actor: z
229
+ .string()
230
+ .describe('The Actor to call: its ID, or its name in the "username/name" form (e.g., "apify/rag-web-browser").'),
245
231
  input: anyJsonObjectSchema.describe('The input JSON to pass to the Actor. Required.'),
246
232
  waitSecs: z
247
233
  .number()
@@ -270,85 +256,47 @@ export const callActorAjvValidate = compileSchema({ ...z.toJSONSchema(callActorA
270
256
  * Uses `actorDefinitionCache` — one definition fetch on a cold cache.
271
257
  */
272
258
  export async function checkPaymentProviderStandbyConflict(params) {
273
- const { actorName, paymentProvider, apifyToken, mcpSessionId } = params;
259
+ const { tool, args, paymentProvider, apifyToken, mcpSessionId } = params;
260
+ if (!paymentProvider || !tool.hasPaymentProviderStandbyCheck)
261
+ return null;
262
+ const actorName = args.actor;
263
+ if (typeof actorName !== 'string' || !actorName)
264
+ return null;
274
265
  const normalizedActorName = fixActorNameInputAndLog(actorName, { mcpSessionId });
275
- const { baseActorName } = resolveActorContext(normalizedActorName);
276
266
  // Token-based client — payment headers are only relevant for actual Actor runs.
277
267
  const apifyClientForDefinition = new ApifyClient({ token: apifyToken });
278
- const actorDefinitionWithInfo = await getActorDefinitionCached(baseActorName, apifyClientForDefinition);
268
+ const actorDefinitionWithInfo = await getActorDefinitionCached(normalizedActorName, apifyClientForDefinition);
279
269
  if (!actorDefinitionWithInfo) {
280
270
  return null;
281
271
  }
282
272
  if (!isActorBlockedUnderPaymentProvider(actorDefinitionWithInfo.info)) {
283
273
  return null;
284
274
  }
285
- // Canonical name, not the caller's identifier — it may be an Actor ID or carry a `:toolName` suffix.
275
+ // Canonical name, not the caller's identifier, which may be an Actor ID.
286
276
  const error = ActorLoadError.standbyPaymentNotSupported(actorDefinitionWithInfo.definition.actorFullName);
287
277
  return respondStandbyRejection(error, { mcpSessionId, paymentProviderId: paymentProvider.id });
288
278
  }
289
- /**
290
- * Resolves MCP URL and parses the "actor:tool" format.
291
- * Shared pre-processing step used by both default and apps variants.
292
- */
293
- export function resolveActorContext(actorName) {
294
- const mcpToolMatch = actorName.match(/^(.+):(.+)$/);
295
- if (mcpToolMatch) {
296
- return {
297
- baseActorName: mcpToolMatch[1],
298
- mcpToolName: mcpToolMatch[2],
299
- };
300
- }
301
- return { baseActorName: actorName, mcpToolName: undefined };
279
+ /** Rejection for an Actor that is an MCP server: its input interface is unused, so a run of it is a mistake. */
280
+ function respondMcpServerActor(actorFullName, route, loadedToolNames) {
281
+ const replacement = loadedToolNames.includes(HELPER_TOOLS.ACTOR_MCP_TOOL_CALL)
282
+ ? ` Its MCP tools can be called with ${HELPER_TOOLS.ACTOR_MCP_TOOL_CALL}.`
283
+ : ` Its MCP tools cannot be called in this configuration. To use them, ${getOwnServerRemedy()}`;
284
+ return respondUserError(`Actor '${actorFullName}' is an MCP server, which ${route} does not run.${replacement}`, {
285
+ detail: 'MCP server Actor',
286
+ });
302
287
  }
303
- /**
304
- * Proxies the MCP tool call flow (when actorName contains ":toolName"). The caller routes here only
305
- * for {@link ACTOR_TOOL_MODE.MCP} Actors, so `mcpServerUrl` is always known good.
306
- */
307
- export async function handleMcpToolCall(params) {
308
- const { baseActorName, mcpToolName, input, mcpServerUrl, apifyToken, mcpSessionId, signal } = params;
309
- if (!input) {
310
- return respondServerError(`Input is required for MCP tool '${mcpToolName}'. Please provide the input parameter based on the tool's input schema.`);
311
- }
312
- if (signal.aborted) {
313
- return respondAborted();
314
- }
315
- const outcome = await withRemoteMcpClient(mcpServerUrl, apifyToken, mcpSessionId, signal, async (client) => client.callTool({ name: mcpToolName, arguments: input }, CallToolResultSchema, {
316
- timeout: EXTERNAL_TOOL_CALL_TIMEOUT_MSEC,
317
- signal,
318
- }));
319
- switch (outcome.outcome) {
320
- case 'connect-failed':
321
- return respondServerError(`Failed to connect to MCP server ${mcpServerUrl}`);
322
- case 'aborted':
323
- return respondAborted();
324
- case 'error':
325
- logHttpError(outcome.error, `Failed to call MCP tool '${mcpToolName}' on Actor '${baseActorName}'`, {
326
- actorName: baseActorName,
327
- toolName: mcpToolName,
328
- });
329
- return respondServerError(`Failed to call MCP tool '${mcpToolName}' on Actor '${baseActorName}': ${remoteMcpFailureDetail(outcome.error)}`);
330
- case 'success': {
331
- // `call-actor` declares `actorRunOutputSchema`, so MCP SDK ≥ 1.11.4 rejects any response
332
- // without `structuredContent` (unless `isError: true`) with -32600. The pass-through has no
333
- // Apify run, so synthesize a sentinel `RunResponse` matching the schema's `required` keys;
334
- // the remote tool's payload still flows through `content`. Also forward `isError` so a
335
- // failing remote tool surfaces as a failure here.
336
- const isErrorFromRemote = outcome.value.isError === true;
337
- return respondRaw({
338
- content: outcome.value.content,
339
- isError: isErrorFromRemote,
340
- structuredContent: {
341
- runId: 'mcp-passthrough',
342
- actorId: baseActorName,
343
- actorName: baseActorName,
344
- status: isErrorFromRemote ? 'FAILED' : 'SUCCEEDED',
345
- storages: {},
346
- summary: `Called MCP tool '${mcpToolName}' on '${baseActorName}'.`,
347
- nextStep: 'Response content carries the remote MCP tool result; no Apify run was started.',
348
- },
349
- });
350
- }
351
- }
288
+ /** Rejects removed MCP call syntax before Actor or payment metadata is fetched. */
289
+ export function buildLegacyMcpSyntaxRejection(toolName, actor, loadedToolNames) {
290
+ if (toolName !== HELPER_TOOLS.ACTOR_CALL && toolName !== HELPER_TOOLS.ACTOR_CALL_WIDGET)
291
+ return null;
292
+ if (typeof actor !== 'string' || !MCP_TOOL_NAME_SUFFIX.test(actor))
293
+ return null;
294
+ const replacement = loadedToolNames.includes(HELPER_TOOLS.ACTOR_MCP_TOOL_CALL)
295
+ ? ` Use ${HELPER_TOOLS.ACTOR_MCP_TOOL_CALL} with separate actor and tool arguments.`
296
+ : ` MCP tools cannot be called in this configuration. To use them, ${getOwnServerRemedy()}`;
297
+ return respondUserError(`The "actor:tool" syntax is no longer supported by ${toolName}.${replacement}`, {
298
+ detail: 'legacy MCP call syntax',
299
+ });
352
300
  }
353
301
  /**
354
302
  * Validates the actor and its input, returning the resolved actor tool or an error response.
@@ -420,29 +368,25 @@ export async function resolveAndValidateActor(params) {
420
368
  return { actor };
421
369
  }
422
370
  /**
423
- * Performs the pre-execution checks common to both modes:
424
- * - Parses args
425
- * - Resolves actor/MCP context
426
- * - Handles payment provider restrictions
427
- * - Handles MCP tool calls
428
- *
429
- * Returns either an early response (error or MCP tool result) or the parsed context for mode-specific execution.
371
+ * Performs the pre-execution checks common to both modes: parses args and rejects an Actor that `call-actor`
372
+ * cannot run (a standby Actor with neither an MCP server nor an input schema, or an MCP server).
430
373
  *
431
- * Applies the same `actor` string normalization as `getActorsAsTools` **before** MCP URL lookup and routing so
432
- * clients cannot pass a clean-enough id for definition fetch but a dirty id to `apifyClient.actor()` (see Mezmo:
433
- * e.g. trailing `` ` `` on `apify/rag-web-browser`).
374
+ * Applies the same `actor` string normalization as `getActorsAsTools` **before** routing so clients cannot pass a
375
+ * clean-enough id for definition fetch but a dirty id to `apifyClient.actor()` (see Mezmo: e.g. trailing `` ` ``
376
+ * on `apify/rag-web-browser`).
434
377
  */
435
378
  export async function callActorPreExecute(toolArgs, options) {
436
379
  const { args, apifyToken, mcpSessionId, loadedToolNames } = toolArgs;
437
380
  const parsedArgs = callActorArgs.parse(args);
381
+ const legacyRejection = buildLegacyMcpSyntaxRejection(options.route, parsedArgs.actor, loadedToolNames);
382
+ if (legacyRejection)
383
+ return { earlyResponse: legacyRejection };
438
384
  const actorName = fixActorNameInputAndLog(parsedArgs.actor, { mcpSessionId, route: options.route });
439
- const parsed = { ...parsedArgs, actor: actorName };
440
- const { baseActorName, mcpToolName } = resolveActorContext(parsed.actor);
441
385
  // For definition resolution we always use a token-based client; payment provider is only for actual Actor runs.
442
386
  // Standby/MCP-server Actors under a third-party payment provider are rejected upstream by
443
387
  // `checkPaymentProviderStandbyConflict` — see src/mcp/tool_call_engine.ts.
444
388
  const apifyClientForDefinition = new ApifyClient({ token: apifyToken });
445
- const resolution = await getActorToolResolutionCached(baseActorName, apifyClientForDefinition);
389
+ const resolution = await getActorToolResolutionCached(actorName, apifyClientForDefinition);
446
390
  if ((resolution === null || resolution === void 0 ? void 0 : resolution.toolMode) === ACTOR_TOOL_MODE.SERVER_ACTOR_WITHOUT_MCP) {
447
391
  const error = ActorLoadError.serverActorWithoutMcpNotSupported(resolution.actorFullName);
448
392
  if (resolution.interfaces.server && loadedToolNames.includes(HELPER_TOOLS.ACTOR_SERVER_REQUEST)) {
@@ -452,40 +396,10 @@ export async function callActorPreExecute(toolArgs, options) {
452
396
  earlyResponse: respondStandbyRejection(error, { mcpSessionId }),
453
397
  };
454
398
  }
455
- const isActorMcpServer = (resolution === null || resolution === void 0 ? void 0 : resolution.toolMode) === ACTOR_TOOL_MODE.MCP;
456
- // Handle the case where LLM does not respect instructions when calling MCP server Actors
457
- // and does not provide the tool name.
458
- const isMcpToolNameInvalid = mcpToolName === undefined || mcpToolName.trim().length === 0;
459
- if (isActorMcpServer && isMcpToolNameInvalid) {
460
- return {
461
- earlyResponse: respondServerError(CALL_ACTOR_MCP_MISSING_TOOL_NAME_MSG),
462
- };
399
+ if ((resolution === null || resolution === void 0 ? void 0 : resolution.toolMode) === ACTOR_TOOL_MODE.MCP) {
400
+ return { earlyResponse: respondMcpServerActor(resolution.actorFullName, options.route, loadedToolNames) };
463
401
  }
464
- // A `:toolName` suffix only means anything for an MCP-server Actor; every other mode is a dead end.
465
- if (mcpToolName) {
466
- if (resolution === null) {
467
- return { earlyResponse: respondActorNotFound(baseActorName, loadedToolNames) };
468
- }
469
- if (resolution.toolMode !== ACTOR_TOOL_MODE.MCP) {
470
- return {
471
- earlyResponse: respondUserError(`Actor '${resolution.actorFullName}' is not an MCP server.`, {
472
- detail: 'tool name given for a non-MCP Actor',
473
- }),
474
- };
475
- }
476
- return {
477
- earlyResponse: await handleMcpToolCall({
478
- baseActorName,
479
- mcpToolName,
480
- input: parsed.input,
481
- mcpServerUrl: resolution.mcpServerUrl,
482
- apifyToken,
483
- mcpSessionId,
484
- signal: toolArgs.signal,
485
- }),
486
- };
487
- }
488
- return { parsed, baseActorName, mcpToolName };
402
+ return { parsed: { ...parsedArgs, actor: actorName } };
489
403
  }
490
404
  /**
491
405
  * Shared start-then-wait flow for call-actor variants (default + apps).
@@ -496,8 +410,8 @@ export async function executeCallActor(toolArgs) {
496
410
  if ('earlyResponse' in preResult) {
497
411
  return preResult.earlyResponse;
498
412
  }
499
- const { parsed, baseActorName } = preResult;
500
- const { input, callOptions } = parsed;
413
+ const { parsed } = preResult;
414
+ const { actor: actorName, input, callOptions } = parsed;
501
415
  // Task mode waits until terminal (waitSecs=undefined uses SDK default ~999999s); caller's waitSecs is ignored.
502
416
  // Non-task mode: pass waitSecs so the SDK blocks up to that many seconds before returning.
503
417
  const waitSecs = toolArgs.taskMode ? undefined : parsed.waitSecs;
@@ -505,7 +419,7 @@ export async function executeCallActor(toolArgs) {
505
419
  let resolvedInputSchema;
506
420
  try {
507
421
  const resolution = await resolveAndValidateActor({
508
- actorName: baseActorName,
422
+ actorName,
509
423
  input: input,
510
424
  toolArgs,
511
425
  });
@@ -518,9 +432,9 @@ export async function executeCallActor(toolArgs) {
518
432
  const abortSignal = toolArgs.signal;
519
433
  if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)
520
434
  return respondAborted();
521
- const actorRun = await apifyClient.actor(baseActorName).start(input, callOptions);
435
+ const actorRun = await apifyClient.actor(actorName).start(input, callOptions);
522
436
  log.debug('Started Actor run', {
523
- actorName: baseActorName,
437
+ actorName,
524
438
  runId: actorRun.id,
525
439
  mcpSessionId: toolArgs.mcpSessionId,
526
440
  waitSecs,
@@ -533,13 +447,13 @@ export async function executeCallActor(toolArgs) {
533
447
  const linkContext = await getConsoleLinkContext(toolArgs.apifyToken, apifyClient);
534
448
  // waitSecs:0 means "fire and forget" — start() already returned the full run, skip re-fetch.
535
449
  if (waitSecs === 0) {
536
- const response = buildStartRunResponse({ actorName: baseActorName, actorRun, linkContext });
450
+ const response = buildStartRunResponse({ actorName, actorRun, linkContext });
537
451
  return { ...response, toolTelemetry: { actorId: resolvedActorId } };
538
452
  }
539
453
  const fetchResult = await fetchActorRunData({
540
454
  runId: actorRun.id,
541
455
  waitSecs,
542
- actorName: baseActorName,
456
+ actorName,
543
457
  client: apifyClient,
544
458
  progressTracker: toolArgs.progressTracker,
545
459
  abortSignal,
@@ -557,7 +471,7 @@ export async function executeCallActor(toolArgs) {
557
471
  }
558
472
  catch (error) {
559
473
  return buildCallActorErrorResponse({
560
- actorName: baseActorName,
474
+ actorName,
561
475
  error,
562
476
  actorId: resolvedActorId,
563
477
  mcpSessionId: toolArgs.mcpSessionId,