Skip to main content
Glama
hackdonalds

JIRA MCP Server

by hackdonalds

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
NameRequiredDescriptionDefault
issueKeyYesThe JIRA issue key
commentYesComment text

Implementation Reference

  • 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;
      }
    }
  • 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;
        }
      }
    );

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