remove_comment
Delete a comment from BAND by specifying the band, post, and comment identifiers to manage group discussions.
Instructions
Delete a comment from BAND.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| band_key | Yes | band identifier | |
| comment_key | Yes | comment identifier to delete | |
| post_key | Yes | post identifier |
Implementation Reference
- src/removeComment/tool.ts:61-87 (handler)The handler function that makes the API call to delete the comment using bandApiClient.post to the '/v2/band/post/comment/remove' endpoint.export async function handleToolCall( band_key: string, post_key: string, comment_key: string ) { try { const params: Record<string, unknown> = { band_key, post_key, comment_key }; const deleteData = await bandApiClient.post<RemoveCommentResponse>( "/v2/band/post/comment/remove", params ); return { content: [ { type: "text", text: JSON.stringify(deleteData, null, 2), }, ], }; } catch (error) { throw new Error( `Failed to delete comment: ${ error instanceof Error ? error.message : "Unknown error" }` ); } }
- src/removeComment/tool.ts:8-52 (schema)ToolDefinition including inputSchema (band_key, post_key, comment_key) and outputSchema for the remove_comment tool.export const ToolDefinition: Tool = { name: "remove_comment", description: "Delete a comment 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", }, comment_key: { type: "string", title: "Comment Key", description: "comment identifier to delete", }, }, required: ["band_key", "post_key", "comment_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:84-89 (registration)Registration in the main tool dispatcher switch statement, delegating to the specific handler.case "remove_comment": return removeComment.handleToolCall( a.band_key as string, a.post_key as string, a.comment_key as string );
- src/tools.ts:27-27 (registration)Inclusion of the tool definition in the exported bandTools array.removeComment.ToolDefinition,