favourite_staff
Use the tool to favourite or unfavourite a staff member on AniList by entering their unique ID, enabling easy management of preferred profiles.
Instructions
[Requires Login] Favourite or unfavourite a staff member by their ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The AniList ID of the staff member to favourite/unfavourite |
Implementation Reference
- tools/people.ts:107-131 (handler)The handler function for the 'favourite_staff' tool. It authenticates the user, toggles the staff member's favourite status using anilist.people.favouriteStaff(id), and returns an appropriate response message.async ({ id }) => { try { const auth = requireAuth(config.anilistToken); if (!auth.isAuthorized) { return auth.errorResponse; } const result = await anilist.people.favouriteStaff(id); return { content: [ { type: "text", text: result ? `Successfully added staff member with ID ${id} to favourites.` : `Staff member with ID ${id} was removed from favourites or operation failed.`, }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },
- tools/people.ts:93-99 (schema)Input schema using Zod, defining the 'id' parameter as a required number (AniList staff ID).{ id: z .number() .describe( "The AniList ID of the staff member to favourite/unfavourite", ), },
- tools/people.ts:89-132 (registration)Full registration of the 'favourite_staff' tool using server.tool(), including name, description, input schema, metadata hints, and inline handler.// anilist.people.favouriteStaff() server.tool( "favourite_staff", "[Requires Login] Favourite or unfavourite a staff member by their ID", { id: z .number() .describe( "The AniList ID of the staff member to favourite/unfavourite", ), }, { title: "Favourite/Unfavourite Staff Member", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true, }, async ({ id }) => { try { const auth = requireAuth(config.anilistToken); if (!auth.isAuthorized) { return auth.errorResponse; } const result = await anilist.people.favouriteStaff(id); return { content: [ { type: "text", text: result ? `Successfully added staff member with ID ${id} to favourites.` : `Staff member with ID ${id} was removed from favourites or operation failed.`, }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );