search_staff
Find AniList staff members by query term, with options to paginate and limit results for efficient searching and data retrieval.
Instructions
Search for staff members based on a query term
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 staff members |
Implementation Reference
- tools/search.ts:260-277 (handler)The handler function that performs the staff search by calling anilist.searchEntry.staff and returns formatted JSON results or an error message.async ({ term, page, amount }) => { try { const results = await anilist.searchEntry.staff(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:242-254 (schema)Zod input schema for the search_staff tool parameters: term (required string), page and amount (optional numbers with defaults).{ term: z.string().describe("Search term for finding staff members"), 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:239-278 (registration)Registration of the search_staff tool on the MCP server within the registerSearchTools function, including name, description, schema, hints, and handler.server.tool( "search_staff", "Search for staff members based on a query term", { term: z.string().describe("Search term for finding staff members"), 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 Staff Search", readOnlyHint: true, openWorldHint: true, }, async ({ term, page, amount }) => { try { const results = await anilist.searchEntry.staff(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, }; } }, );