get_comments
Retrieve all comments for a specific Jira issue using its issue key to access discussion history and team feedback.
Instructions
Get all comments for a Jira issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The issue key (e.g., PROJ-123) |
Implementation Reference
- src/handlers/comment-handlers.ts:66-95 (handler)The main handler function that implements the logic for the 'get_comments' tool. It fetches comments for the given Jira issue key using the API client and formats the response using JiraFormatters.formatComments.async handleGetComments(args: any) { try { const { issueKey } = args; if (!issueKey) { throw new Error('issueKey is required'); } const result = await this.apiClient.get(`/issue/${issueKey}/comment`); return { content: [ { type: 'text', text: JiraFormatters.formatComments(result), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: JiraFormatters.formatError(error), }, ], isError: true, }; } }
- src/tools/definitions.ts:207-220 (schema)The input schema definition for the 'get_comments' tool, specifying that 'issueKey' is required.{ name: 'get_comments', description: 'Get all comments for a Jira issue', inputSchema: { type: 'object', properties: { issueKey: { type: 'string', description: 'The issue key (e.g., PROJ-123)', }, }, required: ['issueKey'], }, },
- src/index.ts:124-125 (registration)The registration of the 'get_comments' tool in the main server switch statement, which dispatches calls to the commentHandlers.handleGetComments method.case 'get_comments': return this.commentHandlers.handleGetComments(request.params.arguments);