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
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | Related data to include in the response (e.g. 'comments,stargazers') | |
| post_number | Yes | Post number to retrieve |
Implementation Reference
- index.ts:491-500 (handler)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) }], }; }
- index.ts:356-365 (helper)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(); }
- index.ts:114-131 (schema)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"], }, };
- index.ts:21-24 (schema)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, ], };