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
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The JIRA issue key (e.g., PROJECT-123) |
Implementation Reference
- server.js:200-215 (handler)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; } }
- server.js:196-198 (schema)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; } } );
- server.js:133-136 (helper)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}`); }