delete_comment
Remove a specific comment from a Jira issue by providing the issue key and comment ID.
Instructions
Delete a comment from a Jira issue
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The issue key containing the comment | |
| commentId | Yes | The ID of the comment to delete |
Implementation Reference
- src/tools/comments.ts:209-220 (handler)The handler case in handleCommentTool that validates args with deleteCommentSchema, calls jiraClient.deleteComment(), and returns a success message with the comment ID.
case 'delete_comment': { const validatedArgs = await deleteCommentSchema.validate(args); const _result = await jiraClient.deleteComment(validatedArgs); return { content: [ { type: 'text', text: `Comment ${validatedArgs.commentId} deleted successfully`, }, ], }; } - src/tools/comments.ts:110-128 (registration)Registration of the 'delete_comment' tool in createCommentTools, with its name, description, and inputSchema (requires issueKey and commentId).
{ name: 'delete_comment', description: 'Delete a comment from a Jira issue', inputSchema: { type: 'object', properties: { issueKey: { type: 'string', description: 'The issue key containing the comment', }, commentId: { type: 'string', description: 'The ID of the comment to delete', }, }, required: ['issueKey', 'commentId'], }, }, ]; - src/schemas/index.ts:189-193 (schema)Yup validation schema for delete_comment: requires 'issueKey' and 'commentId' as strings.
// Schema for deleting comment export const deleteCommentSchema = yup.object({ issueKey: yup.string().required('Issue key is required'), commentId: yup.string().required('Comment ID is required'), });