get_user_manga_list
Retrieve a user's manga list from AniList by providing their username or ID using the anilist-mcp server integration.
Instructions
Get a user's manga list
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | Username or user ID |
Implementation Reference
- tools/lists.ts:97-114 (handler)Handler function that fetches the manga list for the given user using the AniList client and returns it as formatted JSON or an error response.async ({ user }) => { try { const list = await anilist.lists.manga(user); return { content: [ { type: "text", text: JSON.stringify(list, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },
- tools/lists.ts:89-91 (schema)Zod input schema defining the 'user' parameter as either a number (user ID) or string (username).{ user: z.union([z.number(), z.string()]).describe("Username or user ID"), },
- tools/lists.ts:86-115 (registration)Full registration of the 'get_user_manga_list' tool via server.tool(), specifying name, description, input schema, execution hints, and the handler function.server.tool( "get_user_manga_list", "Get a user's manga list", { user: z.union([z.number(), z.string()]).describe("Username or user ID"), }, { title: "Get User Manga List", readOnlyHint: true, openWorldHint: true, }, async ({ user }) => { try { const list = await anilist.lists.manga(user); return { content: [ { type: "text", text: JSON.stringify(list, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );