Skip to main content
Glama

get_comments

Retrieve all comments for a specific Jira issue using its issue key to view discussion history and track issue progress.

Instructions

Get all comments for a Jira issue

Input Schema

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

Implementation Reference

  • The main handler function for the 'get_comments' tool. It fetches comments for a given Jira issue key using the API client and formats them 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,
        };
      }
    }
  • The input schema and metadata definition for the 'get_comments' tool, specifying the required 'issueKey' parameter.
    {
      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 switch case in the tool call handler that routes 'get_comments' requests to the CommentHandlers.handleGetComments method.
    case 'get_comments':
      return this.commentHandlers.handleGetComments(request.params.arguments);

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