Skip to main content
Glama

get_recommendations_for_media

Retrieve personalized AniList media recommendations by providing a media ID, with options to paginate and limit results for efficient browsing.

Instructions

Get AniList recommendations for a specific media

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mediaIDYesThe AniList media ID
pageNoTarget a specific page number for recommendations
perPageNoLimit the page amount (max 25 per AniList limits)

Implementation Reference

  • The handler function that executes the tool: fetches AniList recommendations for a given media ID using pagination, returns JSON stringified response or error.
      async ({ mediaID, page, perPage }) => {
        try {
          const recommendationList = await anilist.recommendation.getList(
            mediaID,
            page,
            perPage,
          );
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(recommendationList, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `Error: ${error.message}` }],
            isError: true,
          };
        }
      },
    );
  • Input schema using Zod: requires mediaID, optional page (default 1) and perPage (default 25).
    {
      mediaID: z.number().describe("The AniList media ID"),
      page: z
        .number()
        .optional()
        .default(1)
        .describe("Target a specific page number for recommendations"),
      perPage: z
        .number()
        .optional()
        .default(25)
        .describe("Limit the page amount (max 25 per AniList limits)"),
    },
  • MCP server tool registration including name, description, input schema, metadata, and inline handler.
    server.tool(
      "get_recommendations_for_media",
      "Get AniList recommendations for a specific media",
      {
        mediaID: z.number().describe("The AniList media ID"),
        page: z
          .number()
          .optional()
          .default(1)
          .describe("Target a specific page number for recommendations"),
        perPage: z
          .number()
          .optional()
          .default(25)
          .describe("Limit the page amount (max 25 per AniList limits)"),
      },
      {
        title: "Get AniList Recommendations for Media",
        readOnlyHint: true,
        openWorldHint: true,
      },
      async ({ mediaID, page, perPage }) => {
        try {
          const recommendationList = await anilist.recommendation.getList(
            mediaID,
            page,
            perPage,
          );
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(recommendationList, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `Error: ${error.message}` }],
            isError: true,
          };
        }
      },
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'gets' recommendations, implying a read-only operation, but doesn't mention any behavioral traits such as rate limits, authentication needs, or pagination behavior. This leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., structure of recommendations), behavioral constraints, or how to handle errors. For a tool with three parameters and no structured output, more context is needed for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all parameters (mediaID, page, perPage) with descriptions. The description adds no additional meaning beyond what the schema provides, such as explaining what 'recommendations' entail or how parameters interact. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('AniList recommendations for a specific media'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_recommendation' (singular vs. plural), which could cause confusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'get_recommendation' or other media-related tools. The description lacks context about prerequisites or typical use cases, leaving the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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