Skip to main content
Glama

get_genres

Retrieve a comprehensive list of all available genres on AniList for precise categorization and streamlined content discovery.

Instructions

Get all available genres on AniList

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'get_genres' tool. Fetches all available genres using the AniList client's genres() method, returns the JSON-stringified list in a text content block, or an error message if failed.
    async () => { try { const genres = await anilist.genres(); return { content: [ { type: "text", text: JSON.stringify(genres, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },
  • tools/misc.ts:56-83 (registration)
    Registration of the 'get_genres' tool using server.tool. Defines name, description, empty input schema, read-only metadata, and attaches the handler function.
    server.tool( "get_genres", "Get all available genres on AniList", {}, { title: "Get Genres", readOnlyHint: true, openWorldHint: true, }, async () => { try { const genres = await anilist.genres(); return { content: [ { type: "text", text: JSON.stringify(genres, 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