Skip to main content
Glama

esa_update_post

Modify existing posts in esa by updating content, title, tags, category, or status using post number identification.

Instructions

Update an existing post

Input Schema

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

Implementation Reference

  • MCP tool dispatcher case for 'esa_update_post': validates arguments, calls EsaClient.updatePost, and formats the 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) }], }; }
  • EsaClient method that executes the HTTP PATCH request to update an existing esa 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(); }
  • Tool definition object for 'esa_update_post' including name, description, and input schema.
    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"], }, };
  • TypeScript interface defining the arguments for updating a post.
    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:604-619 (registration)
    Registers 'esa_update_post' tool (via updatePostTool) in the ListTools response.
    server.setRequestHandler(ListToolsRequestSchema, async () => { console.error("ListToolsRequest received"); return { tools: [ listPostsTool, getPostTool, createPostTool, updatePostTool, listCommentsTool, getCommentTool, createCommentTool, getMembersTool, getMemberTool, ], }; });

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