get_todays_birthday_characters
Retrieve a list of characters from AniList whose birthdays are today. Specify the page number to navigate through the results.
Instructions
Get all characters whose birthday is today
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_todays_birthday_characters"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | What page in the search to target |
Implementation Reference
- tools/people.ts:150-167 (handler)The handler function for the 'get_todays_birthday_characters' tool. It fetches characters with today's birthday using the AniList client, paginated by the input 'page', and returns the JSON stringified data or an error message.
async ({ page }) => { try { const characters = await anilist.people.getBirthdayCharacters(page); return { content: [ { type: "text", text: JSON.stringify(characters, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, - tools/people.ts:138-144 (schema)Input schema for the tool, defining an optional 'page' parameter (number, default 1) for pagination.
{ page: z .number() .optional() .default(1) .describe("What page in the search to target"), }, - tools/people.ts:135-168 (registration)Registration of the 'get_todays_birthday_characters' tool using server.tool(), including description, input schema, metadata hints, and inline handler.
server.tool( "get_todays_birthday_characters", "Get all characters whose birthday is today", { page: z .number() .optional() .default(1) .describe("What page in the search to target"), }, { title: "Get Today's Birthday Characters", readOnlyHint: true, openWorldHint: true, }, async ({ page }) => { try { const characters = await anilist.people.getBirthdayCharacters(page); return { content: [ { type: "text", text: JSON.stringify(characters, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );