Skip to main content
Glama

esa_get_post

Retrieve detailed information about a specific post by specifying its post number and optionally including related data like comments or stargazers via the esa MCP Server interface.

Instructions

Get detailed information about a specific post

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoRelated data to include in the response (e.g. 'comments,stargazers')
post_numberYesPost number to retrieve

Implementation Reference

  • MCP tool handler for 'esa_get_post': validates input, calls EsaClient.getPost, and returns the JSON response.
    case "esa_get_post": { const args = request.params.arguments as unknown as GetPostArgs; if (!args.post_number) { throw new Error("post_number is required"); } const response = await esaClient.getPost(args.post_number, args.include); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
  • Core implementation: fetches post details from ESA API using post_number and optional include param.
    async getPost(post_number: number, include?: string): Promise<any> { const params = new URLSearchParams(); if (include) params.append("include", include); const url = `${this.baseUrl}/posts/${post_number}${params.toString() ? `?${params}` : ""}`; const response = await fetch(url, { headers: this.headers }); return response.json(); }
  • Tool definition including name, description, and input schema (JSON Schema) for esa_get_post.
    const getPostTool: Tool = { name: "esa_get_post", description: "Get detailed information about a specific post", inputSchema: { type: "object", properties: { post_number: { type: "number", description: "Post number to retrieve", }, include: { type: "string", description: "Related data to include in the response (e.g. 'comments,stargazers')", }, }, required: ["post_number"], }, };
  • TypeScript interface defining input arguments for the getPost tool.
    interface GetPostArgs { post_number: number; include?: string; }
  • index.ts:607-618 (registration)
    Registers esa_get_post tool (as getPostTool) in the MCP ListTools response.
    tools: [ listPostsTool, getPostTool, createPostTool, updatePostTool, listCommentsTool, getCommentTool, createCommentTool, getMembersTool, getMemberTool, ], };

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