@apify/actors-mcp-server 0.7.4 → 0.8.1
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.
- package/README.md +12 -0
- package/dist/actor/server.js +10 -10
- package/dist/actor/server.js.map +1 -1
- package/dist/const.d.ts +2 -1
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +2 -55
- package/dist/const.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +13 -10
- package/dist/mcp/server.js.map +1 -1
- package/dist/tools/actor.d.ts +6 -2
- package/dist/tools/actor.d.ts.map +1 -1
- package/dist/tools/actor.js +41 -14
- package/dist/tools/actor.js.map +1 -1
- package/dist/tools/categories.d.ts +1 -0
- package/dist/tools/categories.d.ts.map +1 -1
- package/dist/tools/categories.js +6 -0
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/dataset.d.ts.map +1 -1
- package/dist/tools/dataset.js +12 -1
- package/dist/tools/dataset.js.map +1 -1
- package/dist/tools/fetch-actor-details-internal.d.ts +3 -0
- package/dist/tools/fetch-actor-details-internal.d.ts.map +1 -0
- package/dist/tools/fetch-actor-details-internal.js +63 -0
- package/dist/tools/fetch-actor-details-internal.js.map +1 -0
- package/dist/tools/fetch-actor-details.d.ts.map +1 -1
- package/dist/tools/fetch-actor-details.js +24 -107
- package/dist/tools/fetch-actor-details.js.map +1 -1
- package/dist/tools/get-actor-output.d.ts.map +1 -1
- package/dist/tools/get-actor-output.js +11 -1
- package/dist/tools/get-actor-output.js.map +1 -1
- package/dist/tools/run.d.ts.map +1 -1
- package/dist/tools/run.js +17 -3
- package/dist/tools/run.js.map +1 -1
- package/dist/tools/search-actors-internal.d.ts +3 -0
- package/dist/tools/search-actors-internal.d.ts.map +1 -0
- package/dist/tools/search-actors-internal.js +81 -0
- package/dist/tools/search-actors-internal.js.map +1 -0
- package/dist/tools/store_collection.d.ts +13 -0
- package/dist/tools/store_collection.d.ts.map +1 -1
- package/dist/tools/store_collection.js +20 -12
- package/dist/tools/store_collection.js.map +1 -1
- package/dist/tools/structured-output-schemas.d.ts +189 -0
- package/dist/tools/structured-output-schemas.d.ts.map +1 -1
- package/dist/tools/structured-output-schemas.js +100 -0
- package/dist/tools/structured-output-schemas.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +12 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/actor-details.d.ts +96 -0
- package/dist/utils/actor-details.d.ts.map +1 -1
- package/dist/utils/actor-details.js +209 -0
- package/dist/utils/actor-details.js.map +1 -1
- package/dist/utils/actor-response.d.ts +21 -5
- package/dist/utils/actor-response.d.ts.map +1 -1
- package/dist/utils/actor-response.js +26 -5
- package/dist/utils/actor-response.js.map +1 -1
- package/dist/utils/actor-search.d.ts +23 -0
- package/dist/utils/actor-search.d.ts.map +1 -0
- package/dist/utils/actor-search.js +20 -0
- package/dist/utils/actor-search.js.map +1 -0
- package/dist/utils/generic.d.ts +0 -7
- package/dist/utils/generic.d.ts.map +1 -1
- package/dist/utils/generic.js +0 -28
- package/dist/utils/generic.js.map +1 -1
- package/dist/utils/server-instructions.d.ts +14 -0
- package/dist/utils/server-instructions.d.ts.map +1 -0
- package/dist/utils/server-instructions.js +87 -0
- package/dist/utils/server-instructions.js.map +1 -0
- package/dist/utils/tools-loader.d.ts.map +1 -1
- package/dist/utils/tools-loader.js +15 -2
- package/dist/utils/tools-loader.js.map +1 -1
- package/dist/web/dist/actor-run-widget.js +2765 -16
- package/dist/web/dist/search-actors-widget.js +2766 -17
- package/manifest.json +1 -1
- package/package.json +13 -11
- package/server.json +4 -5
|
@@ -4,6 +4,7 @@ import { HelperTools, TOOL_MAX_OUTPUT_CHARS, TOOL_STATUS } from '../const.js';
|
|
|
4
4
|
import { compileSchema } from '../utils/ajv.js';
|
|
5
5
|
import { getValuesByDotKeys, parseCommaSeparatedList } from '../utils/generic.js';
|
|
6
6
|
import { buildMCPResponse } from '../utils/mcp.js';
|
|
7
|
+
import { datasetItemsOutputSchema } from './structured-output-schemas.js';
|
|
7
8
|
/**
|
|
8
9
|
* Zod schema for get-actor-output tool arguments
|
|
9
10
|
*/
|
|
@@ -75,6 +76,7 @@ USAGE EXAMPLES:
|
|
|
75
76
|
|
|
76
77
|
Note: This tool is automatically included if the Apify MCP Server is configured with any Actor tools (e.g., "apify-slash-rag-web-browser") or tools that can interact with Actors (e.g., "call-actor", "add-actor").`,
|
|
77
78
|
inputSchema: z.toJSONSchema(getActorOutputArgs),
|
|
79
|
+
outputSchema: datasetItemsOutputSchema,
|
|
78
80
|
/**
|
|
79
81
|
* Allow additional properties for Skyfire mode to pass `skyfire-pay-id`.
|
|
80
82
|
*/
|
|
@@ -129,7 +131,15 @@ Note: This tool is automatically included if the Apify MCP Server is configured
|
|
|
129
131
|
if (truncated) {
|
|
130
132
|
outputText += `\n\n[Output was truncated to ${TOOL_MAX_OUTPUT_CHARS} characters to comply with the tool output limits.]`;
|
|
131
133
|
}
|
|
132
|
-
|
|
134
|
+
const structuredContent = {
|
|
135
|
+
datasetId: parsed.datasetId,
|
|
136
|
+
items: cleanedItems,
|
|
137
|
+
itemCount: cleanedItems.length,
|
|
138
|
+
totalItemCount: response.count,
|
|
139
|
+
offset: parsed.offset,
|
|
140
|
+
limit: parsed.limit,
|
|
141
|
+
};
|
|
142
|
+
return { content: [{ type: 'text', text: outputText }], structuredContent };
|
|
133
143
|
},
|
|
134
144
|
};
|
|
135
145
|
//# sourceMappingURL=get-actor-output.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-actor-output.js","sourceRoot":"","sources":["../../src/tools/get-actor-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mCAAmC,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9E,OAAO,EAAE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AC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAChF,CAAC;CACK,CAAC"}
|
package/dist/tools/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/tools/run.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAoB,SAAS,EAAmB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/tools/run.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAoB,SAAS,EAAmB,MAAM,aAAa,CAAC;AAoBhF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,SAsIhB,CAAC;AAUX;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAmCnB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAkClB,CAAC"}
|
package/dist/tools/run.js
CHANGED
|
@@ -8,6 +8,7 @@ import { compileSchema } from '../utils/ajv.js';
|
|
|
8
8
|
import { logHttpError } from '../utils/logging.js';
|
|
9
9
|
import { buildMCPResponse } from '../utils/mcp.js';
|
|
10
10
|
import { generateSchemaFromItems } from '../utils/schema-generation.js';
|
|
11
|
+
import { getActorRunOutputSchema } from './structured-output-schemas.js';
|
|
11
12
|
const getActorRunArgs = z.object({
|
|
12
13
|
runId: z.string()
|
|
13
14
|
.min(1)
|
|
@@ -39,6 +40,7 @@ USAGE EXAMPLES:
|
|
|
39
40
|
- user_input: Show details of run y2h7sK3Wc (where y2h7sK3Wc is an existing run)
|
|
40
41
|
- user_input: What is the datasetId for run y2h7sK3Wc?`,
|
|
41
42
|
inputSchema: z.toJSONSchema(getActorRunArgs),
|
|
43
|
+
outputSchema: getActorRunOutputSchema,
|
|
42
44
|
/**
|
|
43
45
|
* Allow additional properties for Skyfire mode to pass `skyfire-pay-id`.
|
|
44
46
|
*/
|
|
@@ -68,8 +70,21 @@ USAGE EXAMPLES:
|
|
|
68
70
|
});
|
|
69
71
|
}
|
|
70
72
|
log.debug('Get actor run', { runId: parsed.runId, status: run.status });
|
|
73
|
+
let actorName;
|
|
74
|
+
if (run.actId) {
|
|
75
|
+
try {
|
|
76
|
+
const actor = await client.actor(run.actId).get();
|
|
77
|
+
if (actor) {
|
|
78
|
+
actorName = `${actor.username}/${actor.name}`;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
log.warning(`Failed to fetch actor name for run ${parsed.runId}`, { error });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
71
85
|
const structuredContent = {
|
|
72
86
|
runId: run.id,
|
|
87
|
+
actorName,
|
|
73
88
|
status: run.status,
|
|
74
89
|
startedAt: ((_a = run.startedAt) === null || _a === void 0 ? void 0 : _a.toISOString()) || '',
|
|
75
90
|
finishedAt: (_b = run.finishedAt) === null || _b === void 0 ? void 0 : _b.toISOString(),
|
|
@@ -90,12 +105,11 @@ USAGE EXAMPLES:
|
|
|
90
105
|
previewItems: datasetItems.items,
|
|
91
106
|
};
|
|
92
107
|
}
|
|
93
|
-
// When UI mode is enabled, return minimal text with widget metadata
|
|
94
108
|
// When UI mode is disabled, return full text response without widget metadata
|
|
95
109
|
if (apifyMcpServer.options.uiMode === 'openai') {
|
|
96
110
|
const statusText = run.status === 'SUCCEEDED' && structuredContent.dataset
|
|
97
|
-
? `Actor run ${parsed.runId} completed successfully with ${structuredContent.dataset.itemCount} items.
|
|
98
|
-
: `Actor run ${parsed.runId} status: ${run.status}.
|
|
111
|
+
? `Actor run ${parsed.runId} completed successfully with ${structuredContent.dataset.itemCount} items. A widget has been rendered with the details.`
|
|
112
|
+
: `Actor run ${parsed.runId} status: ${run.status}. A progress widget has been rendered.`;
|
|
99
113
|
const widgetConfig = getWidgetConfig(WIDGET_URIS.ACTOR_RUN);
|
|
100
114
|
return buildMCPResponse({
|
|
101
115
|
texts: [statusText],
|
package/dist/tools/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/tools/run.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,mCAAmC,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/tools/run.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,mCAAmC,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B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C5D;;OAEG;IACH,WAAW,EAAE,aAAa,CAAC,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC3F,oBAAoB,EAAE,IAAI;IAC1B,WAAW,EAAE;QACT,KAAK,EAAE,iBAAiB;QACxB,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACvB;IACD,IAAI,EAAE,KAAK,EAAE,QAA0B,EAAE,EAAE;QACvC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC;QACtD,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAExC,MAAM,MAAM,GAAG,mCAAmC,CAAC,cAAc,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QACrF,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;QAClF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;IAC7F,CAAC;CACK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-actors-internal.d.ts","sourceRoot":"","sources":["../../src/tools/search-actors-internal.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAoB,SAAS,EAAmB,MAAM,aAAa,CAAC;AA0BhF,eAAO,MAAM,wBAAwB,EAAE,SAwDtC,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HelperTools } from '../const.js';
|
|
3
|
+
import { searchAndFilterActors } from '../utils/actor-search.js';
|
|
4
|
+
import { compileSchema } from '../utils/ajv.js';
|
|
5
|
+
import { buildMCPResponse } from '../utils/mcp.js';
|
|
6
|
+
import { actorSearchInternalOutputSchema } from './structured-output-schemas.js';
|
|
7
|
+
const searchActorsInternalArgsSchema = z.object({
|
|
8
|
+
limit: z.number()
|
|
9
|
+
.int()
|
|
10
|
+
.min(1)
|
|
11
|
+
.max(100)
|
|
12
|
+
.default(10)
|
|
13
|
+
.describe('The maximum number of Actors to return (default = 10)'),
|
|
14
|
+
offset: z.number()
|
|
15
|
+
.int()
|
|
16
|
+
.min(0)
|
|
17
|
+
.default(0)
|
|
18
|
+
.describe('The number of elements to skip from the start (default = 0)'),
|
|
19
|
+
keywords: z.string()
|
|
20
|
+
.default('')
|
|
21
|
+
.describe('Keywords used to search for Actors in the Apify Store.'),
|
|
22
|
+
category: z.string()
|
|
23
|
+
.default('')
|
|
24
|
+
.describe('Filter the results by the specified category.'),
|
|
25
|
+
});
|
|
26
|
+
export const searchActorsInternalTool = {
|
|
27
|
+
type: 'internal',
|
|
28
|
+
name: HelperTools.STORE_SEARCH_INTERNAL,
|
|
29
|
+
openaiOnly: true,
|
|
30
|
+
description: `Search Actors internally (UI mode internal tool).
|
|
31
|
+
|
|
32
|
+
This tool is available because the LLM is operating in UI mode. Use it for internal lookups
|
|
33
|
+
where data presentation to the user is NOT needed - this tool does NOT render a widget.
|
|
34
|
+
|
|
35
|
+
Use this instead of ${HelperTools.STORE_SEARCH} when you need to find an Actor but the user
|
|
36
|
+
did NOT explicitly ask to search Actors. For example, when user says "scrape me google maps"
|
|
37
|
+
and you need to find the right Actor for the task, then fetch its schema and call it.
|
|
38
|
+
|
|
39
|
+
Returns only minimal fields (fullName, title, description) needed for subsequent calls.`,
|
|
40
|
+
inputSchema: z.toJSONSchema(searchActorsInternalArgsSchema),
|
|
41
|
+
outputSchema: actorSearchInternalOutputSchema,
|
|
42
|
+
ajvValidate: compileSchema(z.toJSONSchema(searchActorsInternalArgsSchema)),
|
|
43
|
+
annotations: {
|
|
44
|
+
title: 'Search Actors (internal)',
|
|
45
|
+
readOnlyHint: true,
|
|
46
|
+
idempotentHint: true,
|
|
47
|
+
openWorldHint: false,
|
|
48
|
+
},
|
|
49
|
+
call: async (toolArgs) => {
|
|
50
|
+
const { args, apifyToken, userRentedActorIds, apifyMcpServer } = toolArgs;
|
|
51
|
+
const parsed = searchActorsInternalArgsSchema.parse(args);
|
|
52
|
+
const actors = await searchAndFilterActors({
|
|
53
|
+
keywords: parsed.keywords,
|
|
54
|
+
apifyToken,
|
|
55
|
+
limit: parsed.limit,
|
|
56
|
+
offset: parsed.offset,
|
|
57
|
+
skyfireMode: apifyMcpServer.options.skyfireMode,
|
|
58
|
+
userRentedActorIds,
|
|
59
|
+
});
|
|
60
|
+
const minimalActors = actors.map((actor) => ({
|
|
61
|
+
fullName: `${actor.username}/${actor.name}`,
|
|
62
|
+
title: actor.title || actor.name,
|
|
63
|
+
description: actor.description || '',
|
|
64
|
+
}));
|
|
65
|
+
return buildMCPResponse({
|
|
66
|
+
texts: [
|
|
67
|
+
`Found ${minimalActors.length} Actors for "${parsed.keywords}".`,
|
|
68
|
+
'',
|
|
69
|
+
`Query: ${parsed.keywords}`,
|
|
70
|
+
'',
|
|
71
|
+
`Actors:\n\`\`\`json\n${JSON.stringify(minimalActors, null, 2)}\n\`\`\``,
|
|
72
|
+
],
|
|
73
|
+
structuredContent: {
|
|
74
|
+
actors: minimalActors,
|
|
75
|
+
query: parsed.keywords,
|
|
76
|
+
count: minimalActors.length,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=search-actors-internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-actors-internal.js","sourceRoot":"","sources":["../../src/tools/search-actors-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAA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,CAAC,CAAC;IACP,CAAC;CACJ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ActorStoreList } from 'apify-client';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import type { ExtendedActorStoreList, ToolEntry } from '../types.js';
|
|
3
4
|
export declare function searchActorsByKeywords(search: string, apifyToken: string, limit?: number | undefined, offset?: number | undefined, allowsAgenticUsers?: boolean | undefined): Promise<ExtendedActorStoreList[]>;
|
|
@@ -7,6 +8,18 @@ export declare const searchActorsArgsSchema: z.ZodObject<{
|
|
|
7
8
|
keywords: z.ZodDefault<z.ZodString>;
|
|
8
9
|
category: z.ZodDefault<z.ZodString>;
|
|
9
10
|
}, z.core.$strip>;
|
|
11
|
+
/**
|
|
12
|
+
* Filters out actors with the 'FLAT_PRICE_PER_MONTH' pricing model (rental actors),
|
|
13
|
+
* unless the actor's ID is present in the user's rented actor IDs list.
|
|
14
|
+
*
|
|
15
|
+
* This is necessary because the Store list API does not support filtering by multiple pricing models at once.
|
|
16
|
+
*
|
|
17
|
+
* @param actors - Array of ActorStorePruned objects to filter.
|
|
18
|
+
* @param userRentedActorIds - Array of Actor IDs that the user has rented.
|
|
19
|
+
* @returns Array of Actors excluding those with 'FLAT_PRICE_PER_MONTH' pricing model (= rental Actors),
|
|
20
|
+
* except for Actors that the user has rented (whose IDs are in userRentedActorIds).
|
|
21
|
+
*/
|
|
22
|
+
export declare function filterRentalActors(actors: ActorStoreList[], userRentedActorIds: string[]): ActorStoreList[];
|
|
10
23
|
/**
|
|
11
24
|
* https://docs.apify.com/api/v2/store-get
|
|
12
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store_collection.d.ts","sourceRoot":"","sources":["../../src/tools/store_collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store_collection.d.ts","sourceRoot":"","sources":["../../src/tools/store_collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAqB,sBAAsB,EAAoB,SAAS,EAAmB,MAAM,aAAa,CAAC;AAO3H,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,MAAM,GAAG,SAAqB,EACrC,MAAM,GAAE,MAAM,GAAG,SAAqB,EACtC,kBAAkB,GAAE,OAAO,GAAG,SAAqB,GACpD,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAOnC;AAED,eAAO,MAAM,sBAAsB;;;;;iBAiCjC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAC9B,MAAM,EAAE,cAAc,EAAE,EACxB,kBAAkB,EAAE,MAAM,EAAE,GAC7B,cAAc,EAAE,CAOlB;AACD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,SA8IjB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { ApifyClient } from '../apify-client.js';
|
|
4
|
-
import {
|
|
4
|
+
import { HelperTools } from '../const.js';
|
|
5
5
|
import { getWidgetConfig, WIDGET_URIS } from '../resources/widgets.js';
|
|
6
6
|
import { formatActorForWidget, formatActorToActorCard, formatActorToStructuredCard } from '../utils/actor-card.js';
|
|
7
|
+
import { searchAndFilterActors } from '../utils/actor-search.js';
|
|
7
8
|
import { compileSchema } from '../utils/ajv.js';
|
|
8
9
|
import { buildMCPResponse } from '../utils/mcp.js';
|
|
9
10
|
import { actorSearchOutputSchema } from './structured-output-schemas.js';
|
|
@@ -60,7 +61,7 @@ Examples:
|
|
|
60
61
|
* @returns Array of Actors excluding those with 'FLAT_PRICE_PER_MONTH' pricing model (= rental Actors),
|
|
61
62
|
* except for Actors that the user has rented (whose IDs are in userRentedActorIds).
|
|
62
63
|
*/
|
|
63
|
-
function filterRentalActors(actors, userRentedActorIds) {
|
|
64
|
+
export function filterRentalActors(actors, userRentedActorIds) {
|
|
64
65
|
// Store list API does not support filtering by two pricing models at once,
|
|
65
66
|
// so we filter the results manually after fetching them.
|
|
66
67
|
return actors.filter((actor) => actor.currentPricingInfo.pricingModel !== 'FLAT_PRICE_PER_MONTH'
|
|
@@ -75,6 +76,7 @@ export const searchActors = {
|
|
|
75
76
|
description: `
|
|
76
77
|
Search the Apify Store to FIND and DISCOVER what scraping tools/Actors exist for specific platforms or use cases.
|
|
77
78
|
This tool provides INFORMATION about available Actors - it does NOT retrieve actual data or run any scraping tasks.
|
|
79
|
+
Do NOT use this tool for helper name resolution before running an Actor; use ${HelperTools.STORE_SEARCH_INTERNAL} instead.
|
|
78
80
|
|
|
79
81
|
Apify Store contains thousands of pre-built Actors (crawlers, scrapers, AI agents, and model context protocol (MCP) servers)
|
|
80
82
|
for all platforms and services including social media, search engines, maps, e-commerce, news, real estate, travel, finance, jobs and more.
|
|
@@ -123,10 +125,15 @@ Returns list of Actor cards with the following info:
|
|
|
123
125
|
call: async (toolArgs) => {
|
|
124
126
|
const { args, apifyToken, userRentedActorIds, apifyMcpServer } = toolArgs;
|
|
125
127
|
const parsed = searchActorsArgsSchema.parse(args);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
const actors = await searchAndFilterActors({
|
|
129
|
+
keywords: parsed.keywords,
|
|
130
|
+
apifyToken,
|
|
131
|
+
limit: parsed.limit,
|
|
132
|
+
offset: parsed.offset,
|
|
133
|
+
skyfireMode: apifyMcpServer.options.skyfireMode,
|
|
134
|
+
userRentedActorIds,
|
|
135
|
+
});
|
|
136
|
+
if (actors.length === 0) {
|
|
130
137
|
const instructions = `No Actors were found for the search query "${parsed.keywords}".
|
|
131
138
|
Try a different query with different keywords, or adjust the limit and offset parameters.
|
|
132
139
|
You can also try using more specific or alternative keywords related to your search topic.`;
|
|
@@ -138,7 +145,6 @@ You can also try using more specific or alternative keywords related to your sea
|
|
|
138
145
|
};
|
|
139
146
|
return buildMCPResponse({ texts: [instructions], structuredContent });
|
|
140
147
|
}
|
|
141
|
-
const actorsText = actorCards.join('\n\n');
|
|
142
148
|
// Generate structured cards for the actors
|
|
143
149
|
const structuredActorCards = actors.map((actor) => formatActorToStructuredCard(actor));
|
|
144
150
|
// Always return schema-compliant format in structuredContent for validation
|
|
@@ -146,7 +152,7 @@ You can also try using more specific or alternative keywords related to your sea
|
|
|
146
152
|
const structuredContent = {
|
|
147
153
|
actors: structuredActorCards,
|
|
148
154
|
query: parsed.keywords,
|
|
149
|
-
count:
|
|
155
|
+
count: actors.length,
|
|
150
156
|
instructions: `If you need more detailed information about any of these Actors, including their input schemas and usage instructions, please use the ${HelperTools.ACTOR_GET_DETAILS} tool with the specific Actor name.
|
|
151
157
|
If the search did not return relevant results, consider refining your keywords, use broader terms or removing less important words from the keywords.`,
|
|
152
158
|
};
|
|
@@ -160,9 +166,9 @@ You can also try using more specific or alternative keywords related to your sea
|
|
|
160
166
|
const texts = [`
|
|
161
167
|
# Search results:
|
|
162
168
|
- **Search query:** ${parsed.keywords}
|
|
163
|
-
- **Number of Actors found:** ${
|
|
169
|
+
- **Number of Actors found:** ${actors.length}
|
|
164
170
|
|
|
165
|
-
|
|
171
|
+
An interactive widget has been rendered with the search results.
|
|
166
172
|
`];
|
|
167
173
|
const widgetConfig = getWidgetConfig(WIDGET_URIS.SEARCH_ACTORS);
|
|
168
174
|
return buildMCPResponse({
|
|
@@ -174,16 +180,18 @@ View the interactive widget below for detailed Actor information.
|
|
|
174
180
|
},
|
|
175
181
|
});
|
|
176
182
|
}
|
|
183
|
+
const actorCards = actors.map((actor) => formatActorToActorCard(actor));
|
|
184
|
+
const actorsText = actorCards.join('\n\n');
|
|
177
185
|
const instructions = `
|
|
178
186
|
# Search results:
|
|
179
187
|
- **Search query:** ${parsed.keywords}
|
|
180
|
-
- **Number of Actors found:** ${
|
|
188
|
+
- **Number of Actors found:** ${actors.length}
|
|
181
189
|
|
|
182
190
|
# Actors:
|
|
183
191
|
|
|
184
192
|
${actorsText}
|
|
185
193
|
|
|
186
|
-
|
|
194
|
+
If you need detailed info for a user-facing request, use ${HelperTools.ACTOR_GET_DETAILS}. For helper/internal schema lookups without UI, use ${HelperTools.ACTOR_GET_DETAILS_INTERNAL}.
|
|
187
195
|
If the search did not return relevant results, consider refining your keywords, use broader terms or removing less important words from the keywords.
|
|
188
196
|
`;
|
|
189
197
|
return buildMCPResponse({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store_collection.js","sourceRoot":"","sources":["../../src/tools/store_collection.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"store_collection.js","sourceRoot":"","sources":["../../src/tools/store_collection.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACnH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,MAAM,CAAC,KAAK,UAAU,sBAAsB,CACxC,MAAc,EACd,UAAkB,EAClB,QAA4B,SAAS,EACrC,SAA6B,SAAS,EACtC,qBAA0C,SAAS;IAEnD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,0BAA0B,EAAE,4CAA4C,MAAM,CAAC,MAAM,0BAA0B;iBAClH;aACJ,CAAC,CAAC;QACP,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;QACxE,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,YAAY,GAAG;;uBAEN,MAAM,CAAC,QAAQ;iCACL,MAAM,CAAC,MAAM;;;;GAI3C,UAAU;;2DAE8C,WAAW,CAAC,iBAAiB,wDAAwD,WAAW,CAAC,0BAA0B;;EAEpL,CAAC;QAEK,OAAO,gBAAgB,CAAC;YACpB,KAAK,EAAE,CAAC,YAAY,CAAC;YACrB,iBAAiB;SACpB,CAAC,CAAC;IACP,CAAC;CACK,CAAC"}
|
|
@@ -442,6 +442,10 @@ export declare const actorDetailsOutputSchema: {
|
|
|
442
442
|
type: "object";
|
|
443
443
|
description: string;
|
|
444
444
|
};
|
|
445
|
+
outputSchema: {
|
|
446
|
+
type: "object";
|
|
447
|
+
description: string;
|
|
448
|
+
};
|
|
445
449
|
};
|
|
446
450
|
};
|
|
447
451
|
/**
|
|
@@ -627,6 +631,44 @@ export declare const actorSearchOutputSchema: {
|
|
|
627
631
|
};
|
|
628
632
|
required: string[];
|
|
629
633
|
};
|
|
634
|
+
/**
|
|
635
|
+
* Schema for internal search results (search-actors-internal tool)
|
|
636
|
+
*/
|
|
637
|
+
export declare const actorSearchInternalOutputSchema: {
|
|
638
|
+
type: "object";
|
|
639
|
+
properties: {
|
|
640
|
+
actors: {
|
|
641
|
+
type: "array";
|
|
642
|
+
items: {
|
|
643
|
+
type: "object";
|
|
644
|
+
properties: {
|
|
645
|
+
fullName: {
|
|
646
|
+
type: string;
|
|
647
|
+
description: string;
|
|
648
|
+
};
|
|
649
|
+
title: {
|
|
650
|
+
type: string;
|
|
651
|
+
description: string;
|
|
652
|
+
};
|
|
653
|
+
description: {
|
|
654
|
+
type: string;
|
|
655
|
+
description: string;
|
|
656
|
+
};
|
|
657
|
+
};
|
|
658
|
+
required: string[];
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
query: {
|
|
662
|
+
type: string;
|
|
663
|
+
description: string;
|
|
664
|
+
};
|
|
665
|
+
count: {
|
|
666
|
+
type: string;
|
|
667
|
+
description: string;
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
required: string[];
|
|
671
|
+
};
|
|
630
672
|
export declare const searchApifyDocsToolOutputSchema: {
|
|
631
673
|
type: "object";
|
|
632
674
|
properties: {
|
|
@@ -668,4 +710,151 @@ export declare const fetchApifyDocsToolOutputSchema: {
|
|
|
668
710
|
};
|
|
669
711
|
required: string[];
|
|
670
712
|
};
|
|
713
|
+
/**
|
|
714
|
+
* Schema for call-actor and direct actor tool outputs.
|
|
715
|
+
* Contains Actor run metadata and dataset items (sync mode only).
|
|
716
|
+
* In async mode, only runId is present.
|
|
717
|
+
*/
|
|
718
|
+
export declare const callActorOutputSchema: {
|
|
719
|
+
type: "object";
|
|
720
|
+
properties: {
|
|
721
|
+
runId: {
|
|
722
|
+
type: string;
|
|
723
|
+
description: string;
|
|
724
|
+
};
|
|
725
|
+
actorName: {
|
|
726
|
+
type: string;
|
|
727
|
+
description: string;
|
|
728
|
+
};
|
|
729
|
+
status: {
|
|
730
|
+
type: string;
|
|
731
|
+
description: string;
|
|
732
|
+
};
|
|
733
|
+
startedAt: {
|
|
734
|
+
type: string;
|
|
735
|
+
description: string;
|
|
736
|
+
};
|
|
737
|
+
input: {
|
|
738
|
+
type: "object";
|
|
739
|
+
description: string;
|
|
740
|
+
};
|
|
741
|
+
datasetId: {
|
|
742
|
+
type: string;
|
|
743
|
+
description: string;
|
|
744
|
+
};
|
|
745
|
+
itemCount: {
|
|
746
|
+
type: string;
|
|
747
|
+
description: string;
|
|
748
|
+
};
|
|
749
|
+
items: {
|
|
750
|
+
type: "array";
|
|
751
|
+
items: {
|
|
752
|
+
type: "object";
|
|
753
|
+
};
|
|
754
|
+
description: string;
|
|
755
|
+
};
|
|
756
|
+
instructions: {
|
|
757
|
+
type: string;
|
|
758
|
+
description: string;
|
|
759
|
+
};
|
|
760
|
+
};
|
|
761
|
+
required: string[];
|
|
762
|
+
};
|
|
763
|
+
/**
|
|
764
|
+
* Schema for get-actor-run tool output.
|
|
765
|
+
* Contains full run information including status, timestamps, stats, and dataset preview.
|
|
766
|
+
*/
|
|
767
|
+
export declare const getActorRunOutputSchema: {
|
|
768
|
+
type: "object";
|
|
769
|
+
properties: {
|
|
770
|
+
runId: {
|
|
771
|
+
type: string;
|
|
772
|
+
description: string;
|
|
773
|
+
};
|
|
774
|
+
actorName: {
|
|
775
|
+
type: string;
|
|
776
|
+
description: string;
|
|
777
|
+
};
|
|
778
|
+
status: {
|
|
779
|
+
type: string;
|
|
780
|
+
description: string;
|
|
781
|
+
};
|
|
782
|
+
startedAt: {
|
|
783
|
+
type: string;
|
|
784
|
+
description: string;
|
|
785
|
+
};
|
|
786
|
+
finishedAt: {
|
|
787
|
+
type: string;
|
|
788
|
+
description: string;
|
|
789
|
+
};
|
|
790
|
+
stats: {
|
|
791
|
+
type: "object";
|
|
792
|
+
description: string;
|
|
793
|
+
};
|
|
794
|
+
dataset: {
|
|
795
|
+
type: "object";
|
|
796
|
+
description: string;
|
|
797
|
+
properties: {
|
|
798
|
+
datasetId: {
|
|
799
|
+
type: string;
|
|
800
|
+
description: string;
|
|
801
|
+
};
|
|
802
|
+
itemCount: {
|
|
803
|
+
type: string;
|
|
804
|
+
description: string;
|
|
805
|
+
};
|
|
806
|
+
schema: {
|
|
807
|
+
type: "object";
|
|
808
|
+
description: string;
|
|
809
|
+
};
|
|
810
|
+
previewItems: {
|
|
811
|
+
type: "array";
|
|
812
|
+
items: {
|
|
813
|
+
type: "object";
|
|
814
|
+
};
|
|
815
|
+
description: string;
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
required: string[];
|
|
819
|
+
};
|
|
820
|
+
};
|
|
821
|
+
required: string[];
|
|
822
|
+
};
|
|
823
|
+
/**
|
|
824
|
+
* Schema for dataset items retrieval tools (get-actor-output, get-dataset-items).
|
|
825
|
+
* Contains dataset items with pagination and count information.
|
|
826
|
+
*/
|
|
827
|
+
export declare const datasetItemsOutputSchema: {
|
|
828
|
+
type: "object";
|
|
829
|
+
properties: {
|
|
830
|
+
datasetId: {
|
|
831
|
+
type: string;
|
|
832
|
+
description: string;
|
|
833
|
+
};
|
|
834
|
+
items: {
|
|
835
|
+
type: "array";
|
|
836
|
+
items: {
|
|
837
|
+
type: "object";
|
|
838
|
+
};
|
|
839
|
+
description: string;
|
|
840
|
+
};
|
|
841
|
+
itemCount: {
|
|
842
|
+
type: string;
|
|
843
|
+
description: string;
|
|
844
|
+
};
|
|
845
|
+
totalItemCount: {
|
|
846
|
+
type: string;
|
|
847
|
+
description: string;
|
|
848
|
+
};
|
|
849
|
+
offset: {
|
|
850
|
+
type: string;
|
|
851
|
+
description: string;
|
|
852
|
+
};
|
|
853
|
+
limit: {
|
|
854
|
+
type: string;
|
|
855
|
+
description: string;
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
required: string[];
|
|
859
|
+
};
|
|
671
860
|
//# sourceMappingURL=structured-output-schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-output-schemas.d.ts","sourceRoot":"","sources":["../../src/tools/structured-output-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6DH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;CAQvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;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