get_staff
Retrieve detailed information about AniList staff members using their ID or name, accessed via the AniList MCP server for API data integration.
Instructions
Get information about staff member by their AniList ID or name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The AniList ID or name of the staff member |
Implementation Reference
- tools/people.ts:220-237 (handler)The handler function that implements the core logic of the 'get_staff' tool by querying AniList for staff information based on the provided ID or name and returning formatted JSON or error.async ({ id }) => { try { const staff = await anilist.people.staff(id); return { content: [ { type: "text", text: JSON.stringify(staff, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },
- tools/people.ts:210-214 (schema)The Zod input schema for the 'get_staff' tool, validating the 'id' parameter as either a number or string.{ id: z .union([z.number(), z.string()]) .describe("The AniList ID or name of the staff member"), },
- tools/people.ts:207-238 (registration)The direct registration of the 'get_staff' tool using server.tool() within the registerPeopleTools function, including name, description, schema, hints, and handler.server.tool( "get_staff", "Get information about staff member by their AniList ID or name", { id: z .union([z.number(), z.string()]) .describe("The AniList ID or name of the staff member"), }, { title: "Get Staff Member Info", readOnlyHint: true, openWorldHint: true, }, async ({ id }) => { try { const staff = await anilist.people.staff(id); return { content: [ { type: "text", text: JSON.stringify(staff, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );
- tools/index.ts:35-35 (registration)Call to registerPeopleTools inside registerAllTools, which triggers the registration of 'get_staff'.registerPeopleTools(server, anilist, config);
- index.ts:61-61 (registration)Top-level call to registerAllTools in the main index.ts, which ultimately registers the 'get_staff' tool.registerAllTools(server, anilist, config);