Skip to main content
Glama

get_issue

Retrieve detailed information about a Jira issue using its key or ID to access issue data, status, and metadata.

Instructions

Get detailed information about a Jira issue by its key or ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueKeyYesThe issue key (e.g., PROJ-123) or issue ID (e.g., 378150)

Implementation Reference

  • The handleGetIssue method in IssueHandlers class that fetches issue details using JiraApiClient, retrieves field metadata, formats the issue using JiraFormatters.formatIssue, and handles errors.
    async handleGetIssue(args: any) { try { const { issueKey } = args; if (!issueKey) { throw new Error('issueKey is required'); } const issue = await this.apiClient.get(`/issue/${issueKey}`); const fieldMetadata = await this.getFieldMetadata(); return { content: [ { type: 'text', text: JiraFormatters.formatIssue(issue, fieldMetadata), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: JiraFormatters.formatError(error), }, ], isError: true, }; } }
  • Defines the tool schema for 'get_issue', specifying the inputSchema with required 'issueKey' parameter and description.
    name: 'get_issue', description: 'Get detailed information about a Jira issue by its key or ID', inputSchema: { type: 'object', properties: { issueKey: { type: 'string', description: 'The issue key (e.g., PROJ-123) or issue ID (e.g., 378150)', }, }, required: ['issueKey'], }, },
  • src/index.ts:98-99 (registration)
    Registers the 'get_issue' tool by routing calls in the MCP server's CallToolRequestSchema handler to the IssueHandlers.handleGetIssue method.
    case 'get_issue': return this.issueHandlers.handleGetIssue(request.params.arguments);
  • Private helper method in IssueHandlers to fetch and cache field metadata from Jira API, used for formatting issue fields in get_issue.
    private async getFieldMetadata(): Promise<Map<string, string>> { if (this.fieldMetadataCache) { return this.fieldMetadataCache; } try { const fields = await this.apiClient.get('/field'); const metadata = new Map<string, string>(); fields.forEach((field: any) => { if (field.id && field.name) { metadata.set(field.id, field.name); } }); this.fieldMetadataCache = metadata; return metadata; } catch (error) { // If field metadata fetch fails, return empty map return new Map<string, string>(); }

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/pdogra1299/jira-mcp-server'

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