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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action but doesn't cover key traits: whether this is a read-only operation (implied by 'Get' but not explicit), what the return format looks like (e.g., list structure, pagination), or any rate limits or permissions required. This leaves significant gaps for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., comment objects with fields like author, body, timestamps) or behavioral aspects like error handling. For a tool with no structured support, this minimal description is inadequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single parameter 'issueKey' with its description. The description adds no additional meaning beyond what the schema provides, such as example usage or constraints, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'all comments for a Jira issue', making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_issue' or 'add_comment' beyond the specific resource type, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_issue' (which might include comments) or 'add_comment'. It lacks context about prerequisites, such as needing an existing issue, or exclusions, like not being able to filter comments.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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