search_user
Find users on AniList by entering a search term, specifying results per page, and navigating through paginated results using the MCP server.
Instructions
Search for users on AniList
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Results per page (max 25) | |
| page | No | Page number for results | |
| term | Yes | Search term for finding users |
Implementation Reference
- tools/search.ts:344-361 (handler)Handler function for the 'search_user' tool that performs a user search on AniList via anilist.searchEntry.user and returns JSON results or error.async ({ term, page, amount }) => { try { const results = await anilist.searchEntry.user(term, page, amount); return { content: [ { type: "text", text: JSON.stringify(results, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },
- tools/search.ts:326-338 (schema)Zod input schema defining parameters for the 'search_user' tool: term (required string), page and amount (optional numbers with defaults).{ term: z.string().describe("Search term for finding users"), page: z .number() .optional() .default(1) .describe("Page number for results"), amount: z .number() .optional() .default(5) .describe("Results per page (max 25)"), },
- tools/search.ts:323-362 (registration)Registration of the 'search_user' tool on the MCP server, including name, description, input schema, metadata, and handler.server.tool( "search_user", "Search for users on AniList", { term: z.string().describe("Search term for finding users"), page: z .number() .optional() .default(1) .describe("Page number for results"), amount: z .number() .optional() .default(5) .describe("Results per page (max 25)"), }, { title: "AniList User Search", readOnlyHint: true, openWorldHint: true, }, async ({ term, page, amount }) => { try { const results = await anilist.searchEntry.user(term, page, amount); return { content: [ { type: "text", text: JSON.stringify(results, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );