Skip to content

Commit 7b7130c

Browse files
MQ37claudejirispilka
authored
fix: Reorder search-actors params by importance: keywords first (#610)
* Reorder search-actors params by importance: keywords first Moves keywords to the first position in the search-actors tool schema, followed by category, limit, and offset. Slack thread: https://apify.slack.com/archives/C09AUCEABDM/p1774504206338179?thread_ts=1774350170.595509&cid=C09AUCEABDM https://claude.ai/code/session_012xSbGp3uN6u1nRM6WjLMFv * refactor: remove category filter from search actors parameters --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Jiri Spilka <jirka.spilka@gmail.com>
1 parent e94830d commit 7b7130c

2 files changed

Lines changed: 12 additions & 18 deletions

File tree

src/tools/core/search_actors_common.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@ import { actorSearchOutputSchema } from '../structured_output_schemas.js';
1010
* Zod schema for search-actors arguments — shared between default and openai variants.
1111
*/
1212
export const searchActorsArgsSchema = z.object({
13-
limit: z.number()
14-
.int()
15-
.min(1)
16-
.max(100)
17-
.default(5)
18-
.describe('The maximum number of Actors to return (default = 5)'),
19-
offset: z.number()
20-
.int()
21-
.min(0)
22-
.default(0)
23-
.describe('The number of elements to skip from the start (default = 0)'),
2413
keywords: z.string()
2514
.default('')
2615
.describe(`Space-separated keywords used to search pre-built solutions (Actors) in the Apify Store.
@@ -39,9 +28,17 @@ Examples:
3928
❌ Bad: "Instagram posts profiles comments hashtags reels stories followers..." (too long, too many terms)
4029
❌ Bad: "data extraction scraping tools" (too generic)
4130
`),
42-
category: z.string()
43-
.default('')
44-
.describe('Filter the results by the specified category.'),
31+
limit: z.number()
32+
.int()
33+
.min(1)
34+
.max(100)
35+
.default(5)
36+
.describe('The maximum number of Actors to return (default = 5)'),
37+
offset: z.number()
38+
.int()
39+
.min(0)
40+
.default(0)
41+
.describe('The number of elements to skip from the start (default = 0)'),
4542
});
4643

4744
const SEARCH_ACTORS_DESCRIPTION = `
@@ -63,7 +60,7 @@ Do NOT use this tool when user wants immediate data retrieval - use apify-slash-
6360
IMPORTANT: There is a high chance that a relevant Actor already exists in the Apify Store so find it first before considering alternative solutions!
6461
6562
Usage:
66-
- ALWAYS prefer broad, generic keywords - use just the platform name (e.g., "TikTok" instead of "TikTok posts", "Instagram" instead of "Instagram scraper").
63+
- Prefer broad, generic keywords - use just the platform name (e.g. "Instagram" instead of "Instagram scraper").
6764
- You MUST always do at least two searches: first with broad keywords, then optionally with more specific terms if needed.
6865
6966
Important limitations: This tool does not return full Actor documentation, input schemas, or detailed usage instructions - only summary information.

src/tools/openai/search_actors_internal.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ const searchActorsInternalArgsSchema = z.object({
2222
keywords: z.string()
2323
.default('')
2424
.describe('Keywords used to search for Actors in the Apify Store.'),
25-
category: z.string()
26-
.default('')
27-
.describe('Filter the results by the specified category.'),
2825
});
2926

3027
export const searchActorsInternalTool: ToolEntry = Object.freeze({

0 commit comments

Comments
 (0)