remove_post
Delete a specific post from a BAND group using the post identifier and band identifier to manage content and maintain group organization.
Instructions
Delete a post from BAND.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| band_key | Yes | band identifier | |
| post_key | Yes | post identifier to delete |
Implementation Reference
- src/removePost/tool.ts:56-78 (handler)The handler function that executes the remove_post tool by calling the BAND API to delete the post and returning the response.export async function handleToolCall(band_key: string, post_key: string) { try { const params: Record<string, unknown> = { band_key, post_key }; const deleteData = await bandApiClient.post<RemovePostResponse>( "/v2/band/post/remove", params ); return { content: [ { type: "text", text: JSON.stringify(deleteData, null, 2), }, ], }; } catch (error) { throw new Error( `Failed to delete post: ${ error instanceof Error ? error.message : "Unknown error" }` ); } }
- src/removePost/tool.ts:8-47 (schema)The ToolDefinition object defining the name, description, inputSchema, and outputSchema for the remove_post tool.export const ToolDefinition: Tool = { name: "remove_post", description: "Delete a post from BAND.", inputSchema: { type: "object", properties: { band_key: { type: "string", title: "Band Key", description: "band identifier", }, post_key: { type: "string", title: "Post Key", description: "post identifier to delete", }, }, required: ["band_key", "post_key"], }, outputSchema: { type: "object", properties: { result_code: { type: "number", description: "Result code", }, result_data: { type: "object", description: "Result data", properties: { message: { type: "string", description: "Result message", }, }, }, }, required: ["result_code", "result_data"], }, };
- src/tools.ts:79-83 (registration)Registration in the main tool dispatcher switch statement that routes 'remove_post' calls to the handler.case "remove_post": return removePost.handleToolCall( a.band_key as string, a.post_key as string );
- src/tools.ts:15-28 (registration)Registration of the tool definition in the bandTools array exported for MCP tool listing.export const bandTools: Tool[] = [ profile.ToolDefinition, bands.ToolDefinition, posts.ToolDefinition, post.ToolDefinition, comments.ToolDefinition, permissions.ToolDefinition, albums.ToolDefinition, photos.ToolDefinition, writeComment.ToolDefinition, writePost.ToolDefinition, removePost.ToolDefinition, removeComment.ToolDefinition, ];
- src/removePost/index.ts:3-5 (helper)Index file that bundles and exports the ToolDefinition and handleToolCall for the remove_post tool.const removePost = {ToolDefinition, handleToolCall} export default removePost;