jira_get_issue
Retrieve detailed information for a specific JIRA issue by providing the issue key, enabling streamlined access to task or project data.
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 handler function for the 'jira_get_issue' tool. It takes an issueKey, fetches the issue data using the JiraClient, formats it as JSON, and returns it in the MCP content format. Includes logging and error handling.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:193-199 (schema)The tool's metadata object containing title, description, and inputSchema definition using Zod for input validation (issueKey as string).{ 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)') } },
- server.js:191-216 (registration)The complete registration of the 'jira_get_issue' tool via server.registerTool(), including the tool name, schema/metadata, and 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)Helper method in JiraClient class that makes the API request to fetch a specific JIRA issue by key, used by the tool handler.async getIssue(issueKey) { logger.info('Getting JIRA issue', { issueKey }); return await this.makeRequest(`issue/${issueKey}`); }