Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions 3 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ The Apify MCP Server is also available on [Docker Hub](https://hub.docker.com/mc

The Actor input schema is processed to be compatible with most MCP clients while adhering to [JSON Schema](https://json-schema.org/) standards. The processing includes:
- **Descriptions** are truncated to 500 characters (as defined in `MAX_DESCRIPTION_LENGTH`).
- **Enum fields** are truncated to a maximum combined length of 200 characters for all elements (as defined in `ACTOR_ENUM_MAX_LENGTH`).
- **Enum fields** are truncated to a maximum combined length of 2000 characters for all elements (as defined in `ACTOR_ENUM_MAX_LENGTH`).
- **Required fields** are explicitly marked with a `REQUIRED` prefix in their descriptions for compatibility with frameworks that may not handle the JSON schema properly.
- **Nested properties** are built for special cases like proxy configuration and request list sources to ensure the correct input structure.
- **Array item types** are inferred when not explicitly defined in the schema, using a priority order: explicit type in items > prefill type > default value type > editor type.
Expand All @@ -359,5 +359,4 @@ For major changes, please open an issue first to discuss your proposal and ensur
- [How to use MCP with Apify Actors](https://blog.apify.com/how-to-use-mcp/)
- [Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client)
- [Webinar: Building and Monetizing MCP Servers on Apify](https://www.youtube.com/watch?v=w3AH3jIrXXo)
- [MCP Client development guide](https://github.com/cyanheads/model-context-protocol-resources/blob/main/guides/mcp-client-development-guide.md)
- [How to build and monetize an AI agent on Apify](https://blog.apify.com/how-to-build-an-ai-agent/)
9 changes: 7 additions & 2 deletions 9 src/tools/store_collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ export async function searchActorsByKeywords(
apifyToken: string,
limit: number | undefined = undefined,
offset: number | undefined = undefined,
allowsAgenticUsers: boolean | undefined = undefined,
): Promise<ExtendedActorStoreList[]> {
const client = new ApifyClient({ token: apifyToken });
const results = await client.store().list({ search, limit, offset });
const storeClient = client.store();
if (allowsAgenticUsers !== undefined) storeClient.params = { ...storeClient.params, allowsAgenticUsers };

const results = await storeClient.list({ search, limit, offset });
return results.items;
}

Expand Down Expand Up @@ -90,13 +94,14 @@ USAGE EXAMPLES:
inputSchema: zodToJsonSchema(searchActorsArgsSchema),
ajvValidate: ajv.compile(zodToJsonSchema(searchActorsArgsSchema)),
call: async (toolArgs) => {
const { args, apifyToken, userRentedActorIds } = toolArgs;
const { args, apifyToken, userRentedActorIds, apifyMcpServer } = toolArgs;
const parsed = searchActorsArgsSchema.parse(args);
let actors = await searchActorsByKeywords(
parsed.search,
apifyToken,
parsed.limit + ACTOR_SEARCH_ABOVE_LIMIT,
parsed.offset,
apifyMcpServer.options.skyfireMode ? true : undefined, // allowsAgenticUsers - filters Actors available for Agentic users
);
actors = filterRentalActors(actors || [], userRentedActorIds || []).slice(0, parsed.limit);
const actorCards = actors.length === 0 ? [] : actors.map(formatActorToActorCard);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.