Skip to main content
Glama

get_thread_comments

Retrieve comments from a specific AniList thread by providing the thread ID, page number, and comments per page. Simplify accessing thread discussions in a structured format.

Instructions

Get comments for a specific thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe AniList thread ID
pageNoThe page number
perPageNoHow many comments per page

Implementation Reference

  • Handler function that calls anilist.thread.getComments(id, page, perPage) to fetch comments and returns them as JSON text block, or error response.
    async ({ id, page = 1, perPage = 25 }) => {
      try {
        const comments = await anilist.thread.getComments(id, page, perPage);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(comments, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [{ type: "text", text: `Error: ${error.message}` }],
          isError: true,
        };
      }
    },
  • Input schema using Zod: id (number, required), page (number, optional, default 1), perPage (number, optional, default 25).
    {
      id: z.number().describe("The AniList thread ID"),
      page: z.number().optional().default(1).describe("The page number"),
      perPage: z
        .number()
        .optional()
        .default(25)
        .describe("How many comments per page"),
    },
  • tools/thread.ts:86-121 (registration)
    Registers the 'get_thread_comments' tool on the MCP server, providing name, description, input schema, metadata hints, and handler function.
    server.tool(
      "get_thread_comments",
      "Get comments for a specific thread",
      {
        id: z.number().describe("The AniList thread ID"),
        page: z.number().optional().default(1).describe("The page number"),
        perPage: z
          .number()
          .optional()
          .default(25)
          .describe("How many comments per page"),
      },
      {
        title: "Get AniList Thread Comments",
        readOnlyHint: true,
        openWorldHint: true,
      },
      async ({ id, page = 1, perPage = 25 }) => {
        try {
          const comments = await anilist.thread.getComments(id, page, perPage);
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(comments, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `Error: ${error.message}` }],
            isError: true,
          };
        }
      },
    );
  • tools/index.ts:38-38 (registration)
    Calls registerThreadTools within registerAllTools to register all thread-related tools, including get_thread_comments.
    registerThreadTools(server, anilist, config);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states a read operation ('Get') but doesn't cover aspects like pagination behavior (implied by 'page' and 'perPage' parameters), rate limits, authentication needs, or error handling. This leaves significant gaps for a tool with multiple parameters.

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 with zero wasted words. It front-loads the core purpose ('Get comments for a specific thread'), making it easy to parse quickly, though this conciseness comes at the cost of completeness in other dimensions.

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 no annotations and no output schema, the description is incomplete for a tool with 3 parameters and pagination behavior. It doesn't explain return values, error cases, or behavioral traits, leaving the agent with insufficient context to use it effectively beyond basic parameter input.

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?

Schema description coverage is 100%, so the schema fully documents parameters like 'id' (AniList thread ID), 'page', and 'perPage'. The description adds no additional meaning beyond implying pagination through the tool's name and context, meeting the baseline for high schema coverage without extra value.

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 verb ('Get') and resource ('comments for a specific thread'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_thread' or 'get_activity', which also retrieve thread-related or comment-related data, leaving some ambiguity about its unique scope.

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. With siblings like 'get_thread' (which might include comments) and 'get_activity' (which could involve comment retrieval), the description lacks context on prerequisites, exclusions, or specific use cases, offering minimal help for selection.

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