Skip to main content
Glama

get_item_comments

Retrieve comments for a specific Qiita article to analyze discussions and gather feedback. Provide the article ID to access all associated comments.

Instructions

Get comments on a specific article.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYesArticle ID

Implementation Reference

  • Handles the MCP tool call for 'get_item_comments': validates the item_id argument, calls the QiitaClient method, and returns the JSON-formatted result.
    case "get_item_comments": {
      if (!args?.item_id) {
        throw new Error("item_id is required");
      }
      const result = await qiitaClient.getItemComments(args.item_id as string);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • QiitaClient helper method that performs the actual API fetch to retrieve comments for the specified item ID.
    async getItemComments(itemId: string): Promise<any[]> {
      return this.fetch(`/items/${itemId}/comments`);
    }
  • Input schema definition for the get_item_comments tool, specifying the required item_id parameter.
    inputSchema: {
      type: "object",
      properties: {
        item_id: {
          type: "string",
          description: "Article ID",
        },
      },
      required: ["item_id"],
    },
  • src/index.ts:244-257 (registration)
    Registers the get_item_comments tool in the tools array used for the ListTools MCP request.
    {
      name: "get_item_comments",
      description: "Get comments on a specific article.",
      inputSchema: {
        type: "object",
        properties: {
          item_id: {
            type: "string",
            description: "Article ID",
          },
        },
        required: ["item_id"],
      },
    },
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. While 'Get comments' implies a read-only operation, it doesn't specify whether authentication is required, if there are rate limits, what format the comments are returned in (e.g., structured list, raw text), or if there are any constraints like pagination. This leaves significant gaps in understanding the tool's behavior.

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, clear sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded with the core action ('Get comments'), making it efficient and easy to parse, which is ideal for conciseness.

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

Completeness3/5

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

For a simple read operation with one well-documented parameter and no output schema, the description is minimally adequate. However, it lacks details on behavioral aspects (e.g., authentication, return format) and usage context compared to siblings, which are important for an AI agent to use it effectively. The absence of annotations and output schema means the description should compensate more than it does.

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%, with the single parameter 'item_id' clearly documented as 'Article ID' in the schema. The description adds no additional meaning beyond this, such as format examples (e.g., numeric vs. string IDs) or context on where to find the ID. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

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 on a specific article'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling tools that might also retrieve comments or related data, such as 'get_item' which might include comments as part of a broader item retrieval.

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?

The description provides no guidance on when to use this tool versus alternatives. Given sibling tools like 'get_item' (which might retrieve the article itself, possibly including comments) and 'search_items' (which might filter articles), there's no indication of when this specific comment-focused tool is preferred or necessary over those alternatives.

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

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/ningen/qiita-mcp-server'

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