get_thread
Retrieve a specific thread from AniList by its unique ID using the dedicated API tool for streamlined data access.
Instructions
Get a specific thread by its AniList ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The AniList ID of the thread |
Implementation Reference
- tools/thread.ts:65-82 (handler)Handler function that retrieves a specific AniList thread by ID using anilist.thread.get(id), returns the thread as JSON string, or an error message if failed.async ({ id }) => { try { const thread = await anilist.thread.get(id); return { content: [ { type: "text", text: JSON.stringify(thread, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },
- tools/thread.ts:57-59 (schema)Input schema defining the required 'id' parameter as a number with description.{ id: z.number().describe("The AniList ID of the thread"), },
- tools/thread.ts:55-83 (registration)Registration of the 'get_thread' tool on the MCP server, including name, description, input schema, metadata hints, and handler reference."get_thread", "Get a specific thread by its AniList ID", { id: z.number().describe("The AniList ID of the thread"), }, { title: "Get AniList Thread", readOnlyHint: true, openWorldHint: true, }, async ({ id }) => { try { const thread = await anilist.thread.get(id); return { content: [ { type: "text", text: JSON.stringify(thread, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );