update_comment
Modify existing comments on Qiita articles by providing the comment ID and new content in Markdown format to update your contributions.
Instructions
指定されたコメントを更新します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | コメントの本文(Markdown形式) | |
| commentId | Yes | コメントID |
Implementation Reference
- src/tools/handlers.ts:176-182 (handler)Handler for the 'update_comment' MCP tool. Defines input schema using Zod and execute function that calls QiitaApiClient.updateComment.update_comment: { schema: z.object({ commentId: z.string(), body: z.string(), }), execute: async ({ commentId, body }, client) => client.updateComment(commentId, body), },
- src/tools/definitions.ts:538-555 (schema)MCP protocol tool schema definition for 'update_comment', used for listing tools and input validation in the server.{ name: 'update_comment', description: '指定されたコメントを更新します', inputSchema: { type: 'object', properties: { commentId: { type: 'string', description: 'コメントID', }, body: { type: 'string', description: 'コメントの本文(Markdown形式)', }, }, required: ['commentId', 'body'], }, },
- src/qiitaApiClient.ts:217-221 (helper)Qiita API client method implementing the core logic: authenticates and sends PATCH request to /comments/{commentId} with new body.async updateComment(commentId: string, body: string) { this.assertAuthenticated(); const response = await this.client.patch(`/comments/${commentId}`, { body }); return response.data; }