Skip to main content
Glama

esa_list_comments

Retrieve comments for a specific esa post by providing the post number, with options to paginate results for efficient comment management.

Instructions

Get a list of comments for a post

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_numberYesPost number to get comments for
pageNoPage number to retrieve
per_pageNoNumber of results per page (default: 20, max: 100)

Implementation Reference

  • Handler logic for the esa_list_comments tool. Validates arguments, calls esaClient.listComments, and returns the API response as JSON.
    case "esa_list_comments": {
      const args = request.params.arguments as unknown as ListCommentsArgs;
      if (!args.post_number) {
        throw new Error("post_number is required");
      }
      const response = await esaClient.listComments(
        args.post_number,
        args.page,
        args.per_page
      );
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Tool schema definition including name, description, and input schema for esa_list_comments.
    const listCommentsTool: Tool = {
      name: "esa_list_comments",
      description: "Get a list of comments for a post",
      inputSchema: {
        type: "object",
        properties: {
          post_number: {
            type: "number",
            description: "Post number to get comments for",
          },
          page: {
            type: "number",
            description: "Page number to retrieve",
            default: 1,
          },
          per_page: {
            type: "number",
            description: "Number of results per page (default: 20, max: 100)",
            default: 20,
          },
        },
        required: ["post_number"],
      },
    };
  • EsaClient helper method that performs the HTTP request to the esa API to list comments for a given post.
    async listComments(post_number: number, page?: number, per_page?: number): Promise<any> {
      const params = new URLSearchParams();
      
      if (page) params.append("page", page.toString());
      if (per_page) params.append("per_page", per_page.toString());
    
      const url = `${this.baseUrl}/posts/${post_number}/comments${params.toString() ? `?${params}` : ""}`;
      const response = await fetch(url, { headers: this.headers });
    
      return response.json();
    }
  • TypeScript interface defining the expected arguments for the esa_list_comments tool.
    interface ListCommentsArgs {
      post_number: number;
      page?: number;
      per_page?: number;
    }
  • index.ts:607-619 (registration)
    Tool registration in the ListToolsRequest handler by including listCommentsTool in the returned tools list.
        tools: [
          listPostsTool,
          getPostTool,
          createPostTool,
          updatePostTool,
          listCommentsTool,
          getCommentTool,
          createCommentTool,
          getMembersTool,
          getMemberTool,
        ],
      };
    });
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 a list' implies a read-only operation, it doesn't specify whether authentication is required, if there are rate limits, what the return format looks like (e.g., JSON array), or if results are paginated (though parameters suggest pagination). For a tool with zero annotation coverage, this is insufficient.

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's appropriately sized and front-loaded, with zero wasted verbiage. Every word earns its place.

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 address authentication needs, rate limits, error conditions, or the structure of returned data. For a tool that likely interacts with an API (ESA appears to be a platform like a knowledge base), this leaves significant gaps in understanding how to use it effectively.

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 all parameters clearly documented in the schema itself. The description doesn't add any meaningful parameter semantics beyond what's already in the schema (e.g., it doesn't explain the relationship between 'post_number' and comments or provide usage examples). 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 a list') and resource ('comments for a post'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'esa_get_comment', which suggests it retrieves a single comment rather than a list. The description is specific but lacks sibling distinction.

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. It doesn't mention when to choose 'esa_list_comments' over 'esa_get_comment' (for a single comment) or 'esa_get_post' (which might include comments). There are no prerequisites, exclusions, or contextual advice provided.

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/kajirita2002/esa-mcp-server'

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