Skip to main content
Glama

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
NameRequiredDescriptionDefault
userYesUsername or user ID

Implementation Reference

  • 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,
        };
      }
    },
  • 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,
          };
        }
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuna0x0/anilist-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server