Skip to main content
Glama
hackdonalds

JIRA MCP Server

by hackdonalds

jira_get_issue

Retrieve detailed information about a specific JIRA issue using its issue key, enabling quick access to issue status, description, and related data for project management.

Instructions

Get details of a specific JIRA issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueKeyYesThe JIRA issue key (e.g., PROJECT-123)

Implementation Reference

  • The inline handler function for the 'jira_get_issue' tool. It takes an issueKey, calls jiraClient.getIssue to fetch the issue data, formats it as JSON, and returns it in the MCP response format. Handles errors by logging and rethrowing.
    async ({ issueKey }) => {
      logger.info('Getting JIRA issue', { issueKey });
      try {
        const issue = await jiraClient.getIssue(issueKey);
        logger.info('Successfully retrieved issue', { issueKey });
        return {
          content: [{
            type: 'text',
            text: JSON.stringify(issue, null, 2)
          }]
        };
      } catch (error) {
        logger.error('Failed to get issue', { issueKey, error: error.message });
        throw error;
      }
    }
  • The Zod input schema for the 'jira_get_issue' tool, specifying the required 'issueKey' parameter as a string with description.
    inputSchema: {
      issueKey: z.string().describe('The JIRA issue key (e.g., PROJECT-123)')
    }
  • server.js:191-216 (registration)
    The registration of the 'jira_get_issue' tool on the McpServer instance, including title, description, input schema, and the inline handler function.
    server.registerTool(
      'jira_get_issue',
      {
        title: 'Get JIRA Issue',
        description: 'Get details of a specific JIRA issue',
        inputSchema: {
          issueKey: z.string().describe('The JIRA issue key (e.g., PROJECT-123)')
        }
      },
      async ({ issueKey }) => {
        logger.info('Getting JIRA issue', { issueKey });
        try {
          const issue = await jiraClient.getIssue(issueKey);
          logger.info('Successfully retrieved issue', { issueKey });
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(issue, null, 2)
            }]
          };
        } catch (error) {
          logger.error('Failed to get issue', { issueKey, error: error.message });
          throw error;
        }
      }
    );
  • The JiraClient.getIssue helper method invoked by the tool handler. It logs the request and delegates to makeRequest to fetch the issue from the JIRA REST API endpoint `/rest/api/2/issue/{issueKey}`.
    async getIssue(issueKey) {
      logger.info('Getting JIRA issue', { issueKey });
      return await this.makeRequest(`issue/${issueKey}`);
    }

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