jira_get_comments
Retrieve comments from a Jira issue to track discussions and updates. Provide the issue key to access all associated comments.
Instructions
Get comments on a Jira issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The Jira issue key |
Implementation Reference
- src/index.ts:1019-1025 (handler)MCP tool handler for jira_get_comments: parses input, calls jiraClient.getComments, returns JSON stringified comments.case "jira_get_comments": { const { issueKey } = GetCommentsSchema.parse(args); const comments = await jiraClient.getComments(issueKey); return { content: [{ type: "text", text: JSON.stringify(comments, null, 2) }], }; }
- src/index.ts:324-334 (registration)Tool registration in ListTools response, defines name, description, and input schema.{ name: "jira_get_comments", description: "Get comments on a Jira issue", inputSchema: { type: "object", properties: { issueKey: { type: "string", description: "The Jira issue key" }, }, required: ["issueKey"], }, },
- src/index.ts:90-92 (schema)Zod schema for input validation used in the handler.const GetCommentsSchema = z.object({ issueKey: z.string().describe("The Jira issue key"), });
- src/jira-client.ts:128-134 (helper)Core implementation: GET request to Jira REST API /issue/{issueKey}/comment to fetch comments.async getComments( issueKey: string ): Promise<{ comments: JiraComment[]; total: number }> { return this.request<{ comments: JiraComment[]; total: number }>( `/issue/${issueKey}/comment` ); }
- src/types.ts:60-70 (schema)TypeScript interface defining the structure of JiraComment objects returned by the API.export interface JiraComment { id: string; self: string; body: string; author: { displayName: string; name: string; }; created: string; updated: string; }