Skip to main content
Glama

esa_update_post

Modify an existing post on the esa platform by updating its title, body, category, tags, or WIP status. Use this tool to make changes to posts efficiently within the esa MCP Server.

Instructions

Update an existing post

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
body_mdNoNew body for the post (Markdown format)
categoryNoNew category for the post
created_byNoPoster's screen_name (only team owners can specify)
messageNoChange message
nameNoNew title for the post
original_revisionNoRevision to base the update on
post_numberYesPost number to update
tagsNoNew list of tags for the post
wipNoWhether to mark as WIP (Work In Progress)

Implementation Reference

  • Executes the esa_update_post tool: validates post_number, calls EsaClient.updatePost with destructured args, returns JSON response.
    case "esa_update_post": { const args = request.params.arguments as unknown as UpdatePostArgs; if (!args.post_number) { throw new Error("post_number is required"); } const { post_number, ...postData } = args; const response = await esaClient.updatePost(post_number, postData); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
  • Tool definition including name, description, and detailed inputSchema for esa_update_post.
    const updatePostTool: Tool = { name: "esa_update_post", description: "Update an existing post", inputSchema: { type: "object", properties: { post_number: { type: "number", description: "Post number to update", }, name: { type: "string", description: "New title for the post", }, body_md: { type: "string", description: "New body for the post (Markdown format)", }, tags: { type: "array", items: { type: "string" }, description: "New list of tags for the post", }, category: { type: "string", description: "New category for the post", }, wip: { type: "boolean", description: "Whether to mark as WIP (Work In Progress)", }, message: { type: "string", description: "Change message", }, created_by: { type: "string", description: "Poster's screen_name (only team owners can specify)", }, original_revision: { type: "string", description: "Revision to base the update on", }, }, required: ["post_number"], }, };
  • EsaClient.updatePost method performs the HTTP PATCH request to the esa.io API to update the specified post.
    async updatePost(post_number: number, postData: Omit<UpdatePostArgs, 'post_number'>): Promise<any> { const url = `${this.baseUrl}/posts/${post_number}`; const response = await fetch(url, { method: "PATCH", headers: this.headers, body: JSON.stringify({ post: postData }), }); return response.json(); }
  • TypeScript interface defining the structure of arguments for the updatePost tool.
    interface UpdatePostArgs { post_number: number; name?: string; body_md?: string; tags?: string[]; category?: string; wip?: boolean; message?: string; created_by?: string; original_revision?: string; }
  • index.ts:607-617 (registration)
    Registration of esa_update_post tool (as updatePostTool) in the list returned by ListToolsRequest handler.
    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