Skip to main content
Glama

esa_create_comment

Add comments to esa articles using Markdown formatting to provide feedback, ask questions, or contribute to discussions on specific posts.

Instructions

Post a comment to an article

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_numberYesPost number to comment on
body_mdYesComment body (Markdown format)
userNoPoster's screen_name (only team owners can specify)

Implementation Reference

  • Handler logic for the 'esa_create_comment' tool within the CallToolRequest switch statement. Validates arguments and calls EsaClient.createComment.
    case "esa_create_comment": {
      const args = request.params.arguments as unknown as CreateCommentArgs;
      if (!args.post_number || !args.body_md) {
        throw new Error("post_number and body_md are required");
      }
      const response = await esaClient.createComment(
        args.post_number,
        args.body_md,
        args.user
      );
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Tool schema definition including name, description, and inputSchema for 'esa_create_comment'.
    const createCommentTool: Tool = {
      name: "esa_create_comment",
      description: "Post a comment to an article",
      inputSchema: {
        type: "object",
        properties: {
          post_number: {
            type: "number",
            description: "Post number to comment on",
          },
          body_md: {
            type: "string",
            description: "Comment body (Markdown format)",
          },
          user: {
            type: "string",
            description: "Poster's screen_name (only team owners can specify)",
          },
        },
        required: ["post_number", "body_md"],
      },
    };
  • index.ts:604-619 (registration)
    Registration of the 'esa_create_comment' tool (as createCommentTool) in the ListToolsRequest handler, making it available to clients.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      console.error("ListToolsRequest received");
      return {
        tools: [
          listPostsTool,
          getPostTool,
          createPostTool,
          updatePostTool,
          listCommentsTool,
          getCommentTool,
          createCommentTool,
          getMembersTool,
          getMemberTool,
        ],
      };
    });
  • EsaClient helper method that performs the actual HTTP POST request to create a comment on the esa API.
    async createComment(post_number: number, body_md: string, user?: string): Promise<any> {
      const url = `${this.baseUrl}/posts/${post_number}/comments`;
      const commentData: { body_md: string; user?: string } = { body_md };
      
      if (user) commentData.user = user;
    
      const response = await fetch(url, {
        method: "POST",
        headers: this.headers,
        body: JSON.stringify({ comment: commentData }),
      });
    
      return response.json();
    }
  • TypeScript interface defining the arguments for createComment, used for type casting in the tool handler.
    interface CreateCommentArgs {
      post_number: number;
      body_md: string;
      user?: string;
    }
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. While 'Post a comment' implies a write operation, it doesn't specify authentication requirements, rate limits, error conditions, or what happens on success (e.g., whether a comment ID is returned). This leaves significant gaps for an agent to understand 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, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a straightforward tool and gets directly to the point.

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?

For a write operation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after posting (success response, error handling), authentication requirements, or how it differs from sibling tools. The combination of mutation behavior and lack of structured metadata creates significant gaps in understanding.

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 description adds no parameter information beyond what's already in the schema, which has 100% coverage with clear descriptions for all three parameters. The baseline score of 3 reflects adequate parameter documentation through the schema alone, though the description doesn't provide additional context about parameter relationships or usage examples.

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 ('Post') and resource ('a comment to an article'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'esa_create_post' or 'esa_list_comments', which would require specifying that this is specifically for commenting on existing articles rather than creating new posts or listing comments.

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 like 'esa_create_post' for creating new articles or 'esa_list_comments' for retrieving comments. There's no mention of prerequisites, permissions, or contextual factors that would help an agent choose this tool appropriately.

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