delete_comment
Remove unwanted or outdated comments from Qiita articles to maintain content quality and relevance. Specify the comment ID to delete specific comments.
Instructions
指定されたコメントを削除します
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"commentId": "<commentId>"
},
"name": "delete_comment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commentId | Yes | コメントID |
Implementation Reference
- src/tools/handlers.ts:183-186 (handler)The handler for the 'delete_comment' tool. It defines the input schema using commentIdSchema and the execute function that calls the QiitaApiClient's deleteComment method with the provided commentId.
delete_comment: { schema: commentIdSchema, execute: async ({ commentId }, client) => client.deleteComment(commentId), }, - src/tools/definitions.ts:556-569 (registration)The MCP tool registration for 'delete_comment', including name, description, and input schema definition.
{ name: 'delete_comment', description: '指定されたコメントを削除します', inputSchema: { type: 'object', properties: { commentId: { type: 'string', description: 'コメントID', }, }, required: ['commentId'], }, }, - src/tools/handlers.ts:27-29 (schema)The Zod schema definition for commentId input, used by the delete_comment handler.
const commentIdSchema = z.object({ commentId: z.string(), }); - src/qiitaApiClient.ts:223-227 (helper)The QiitaApiClient helper method that implements the actual DELETE request to the Qiita API to delete the comment.
async deleteComment(commentId: string) { this.assertAuthenticated(); await this.client.delete(`/comments/${commentId}`); return { success: true }; }