jira_add_comment
Add comments to JIRA issues to provide updates, document progress, or communicate with team members about specific tasks.
Instructions
Add a comment to a JIRA issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The JIRA issue key | |
| comment | Yes | Comment text |
Implementation Reference
- server.js:383-401 (handler)Handler function that executes the jira_add_comment tool: adds a comment to a JIRA issue using jiraClient.addComment and returns the result.async ({ issueKey, comment }) => { logger.info('Adding comment to JIRA issue', { issueKey }); try { const addedComment = await jiraClient.addComment(issueKey, comment); logger.info('Successfully added comment', { issueKey, commentId: addedComment.id }); return { content: [{ type: 'text', text: JSON.stringify(addedComment, null, 2) }] }; } catch (error) { logger.error('Failed to add comment', { issueKey, error: error.message }); throw error; } }
- server.js:378-381 (schema)Input schema defining parameters for jira_add_comment: issueKey (string) and comment (string).inputSchema: { issueKey: z.string().describe('The JIRA issue key'), comment: z.string().describe('Comment text') }
- server.js:373-402 (registration)Registration of the jira_add_comment tool with server.registerTool, including title, description, inputSchema, and inline handler.server.registerTool( 'jira_add_comment', { title: 'Add JIRA Comment', description: 'Add a comment to a JIRA issue', inputSchema: { issueKey: z.string().describe('The JIRA issue key'), comment: z.string().describe('Comment text') } }, async ({ issueKey, comment }) => { logger.info('Adding comment to JIRA issue', { issueKey }); try { const addedComment = await jiraClient.addComment(issueKey, comment); logger.info('Successfully added comment', { issueKey, commentId: addedComment.id }); return { content: [{ type: 'text', text: JSON.stringify(addedComment, null, 2) }] }; } catch (error) { logger.error('Failed to add comment', { issueKey, error: error.message }); throw error; } } );