jira_get_issue
Retrieve detailed information about a specific Jira issue using its unique key, enabling users to access issue data and expanded fields for project management and tracking.
Instructions
Get details of a Jira issue by its key
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The Jira issue key (e.g., PROJ-123) | |
| expand | No | Fields to expand |
Implementation Reference
- src/index.ts:927-933 (handler)MCP tool handler in the CallToolRequestHandler switch statement. Validates input using GetIssueSchema, calls jiraClient.getIssue(), and returns the issue as JSON text.case "jira_get_issue": { const { issueKey, expand } = GetIssueSchema.parse(args); const issue = await jiraClient.getIssue(issueKey, expand); return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }], }; }
- src/index.ts:36-39 (schema)Zod schema used for input validation in the tool handler.const GetIssueSchema = z.object({ issueKey: z.string().describe("The Jira issue key (e.g., PROJ-123)"), expand: z.array(z.string()).optional().describe("Fields to expand"), });
- src/index.ts:211-229 (registration)Tool registration in ListToolsRequestHandler, including JSON input schema for MCP client discovery.{ name: "jira_get_issue", description: "Get details of a Jira issue by its key", inputSchema: { type: "object", properties: { issueKey: { type: "string", description: "The Jira issue key (e.g., PROJ-123)", }, expand: { type: "array", items: { type: "string" }, description: "Fields to expand", }, }, required: ["issueKey"], }, },
- src/jira-client.ts:52-55 (helper)Core implementation in JiraClient class that performs the HTTP request to Jira REST API to fetch the issue details.async getIssue(issueKey: string, expand?: string[]): Promise<JiraIssue> { const params = expand ? `?expand=${expand.join(",")}` : ""; return this.request<JiraIssue>(`/issue/${issueKey}${params}`); }
- src/types.ts:6-46 (schema)TypeScript interface defining the structure of a JiraIssue returned by the API.export interface JiraIssue { id: string; key: string; self: string; fields: { summary: string; description?: string; status: { name: string; id: string; }; priority?: { name: string; id: string; }; assignee?: { displayName: string; emailAddress: string; name: string; }; reporter?: { displayName: string; emailAddress: string; name: string; }; created: string; updated: string; issuetype: { name: string; id: string; }; project: { key: string; name: string; }; labels?: string[]; components?: Array<{ name: string }>; fixVersions?: Array<{ name: string }>; [key: string]: unknown; }; }