Skip to main content
Glama

esa_get_comment

Retrieve a specific comment by its ID from the esa API, optionally including related data such as stargazers, through the Model Context Protocol.

Instructions

Get a specific comment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_idYesID of the comment to retrieve
includeNoレスポンスに含める関連データ (例: 'stargazers')

Implementation Reference

  • Executes the esa_get_comment tool: validates comment_id argument, calls esaClient.getComment(), serializes and returns the API response.
    case "esa_get_comment": { const args = request.params.arguments as unknown as GetCommentArgs; if (!args.comment_id) { throw new Error("comment_id is required"); } const response = await esaClient.getComment(args.comment_id, args.include); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
  • Input schema definition for esa_get_comment tool, specifying required comment_id (number) and optional include (string).
    const getCommentTool: Tool = { name: "esa_get_comment", description: "Get a specific comment", inputSchema: { type: "object", properties: { comment_id: { type: "number", description: "ID of the comment to retrieve", }, include: { type: "string", description: "レスポンスに含める関連データ (例: 'stargazers')", }, }, required: ["comment_id"], }, };
  • index.ts:607-618 (registration)
    Registers the esa_get_comment tool (getCommentTool) in the array returned by the ListToolsRequest handler.
    tools: [ listPostsTool, getPostTool, createPostTool, updatePostTool, listCommentsTool, getCommentTool, createCommentTool, getMembersTool, getMemberTool, ], };
  • EsaClient.getComment helper method: constructs ESA API URL for /comments/{comment_id}, optionally adds include param, fetches and returns JSON.
    async getComment(comment_id: number, include?: string): Promise<any> { const params = new URLSearchParams(); if (include) params.append("include", include); const url = `${this.baseUrl}/comments/${comment_id}${params.toString() ? `?${params}` : ""}`; const response = await fetch(url, { headers: this.headers }); return response.json(); }
  • TypeScript interface defining input arguments for esa_get_comment tool.
    interface GetCommentArgs { comment_id: number; include?: string; }

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

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