Skip to main content
Glama
hackdonalds

JIRA MCP Server

by hackdonalds

jira_add_comment

Add a comment to a JIRA issue by specifying the issue key and comment text, enabling AI assistants to interact with JIRA APIs through the JIRA MCP Server.

Instructions

Add a comment to a JIRA issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commentYesComment text
issueKeyYesThe JIRA issue key

Implementation Reference

  • The tool handler function that adds a comment to the specified JIRA issue using jiraClient.addComment. It logs the action, handles errors, and returns the added comment as a JSON-formatted text response.
    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; } }
  • Input schema for the jira_add_comment tool, defining 'issueKey' and 'comment' parameters using Zod validation.
    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, input schema, and inline handler function.
    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; } } );

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hackdonalds/jira-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server