Skip to main content
Glama

linear_getComments

Retrieve all comments for a specific Linear issue to track discussions and feedback. Use the issue ID to fetch comments with optional limit control.

Instructions

Get all comments for an issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the issue to get comments from (e.g., ABC-123)
limitNoMaximum number of comments to return (default: 25)

Implementation Reference

  • Handler function for linear_getComments tool. Validates input using isGetCommentsArgs type guard and delegates to LinearService.getComments.
    export function handleGetComments(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isGetCommentsArgs(args)) {
            throw new Error('Invalid arguments for getComments');
          }
    
          return await linearService.getComments(args.issueId, args.limit);
        } catch (error) {
          logError('Error getting comments for issue', error);
          throw error;
        }
      };
    }
  • Tool schema definition for linear_getComments, including input and output schemas.
    export const getCommentsToolDefinition: MCPToolDefinition = {
      name: 'linear_getComments',
      description: 'Get all comments for an issue',
      input_schema: {
        type: 'object',
        properties: {
          issueId: {
            type: 'string',
            description: 'ID or identifier of the issue to get comments from (e.g., ABC-123)',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of comments to return (default: 25)',
          },
        },
        required: ['issueId'],
      },
      output_schema: {
        type: 'array',
        items: {
          type: 'object',
          properties: {
            id: { type: 'string' },
            body: { type: 'string' },
            createdAt: { type: 'string' },
            user: {
              type: 'object',
              properties: {
                id: { type: 'string' },
                name: { type: 'string' },
              },
            },
            url: { type: 'string' },
          },
        },
      },
    };
  • Registration of the linear_getComments tool handler in the registerToolHandlers function.
      linear_getComments: handleGetComments(linearService),
    };
  • Type guard function isGetCommentsArgs used in the handler for input validation.
    /**
     * Type guard for linear_getComments tool arguments
     */
    export function isGetCommentsArgs(args: unknown): args is {
      issueId: string;
      limit?: number;
    } {
      return (
        typeof args === 'object' &&
        args !== null &&
        'issueId' in args &&
        typeof (args as { issueId: string }).issueId === 'string' &&
        (!('limit' in args) || typeof (args as { limit: number }).limit === 'number')
      );
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it's a read operation ('Get'), but doesn't mention pagination, rate limits, authentication needs, error conditions, or what 'all comments' means in practice (e.g., chronological order, inclusion of deleted comments).

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, clear sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a simple retrieval tool.

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?

For a read tool with no annotations and no output schema, the description is too minimal. It doesn't explain the return format (e.g., list structure, comment fields), error handling, or behavioral constraints like rate limits, leaving significant gaps for agent understanding.

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 fully documents both parameters (issueId and limit). The description adds no parameter-specific information beyond what's in the schema, 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 an issue'), making the purpose immediately understandable. However, it doesn't distinguish this tool from potential sibling comment-related tools (though none are listed in the provided siblings).

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. It doesn't mention sibling tools like linear_getIssueById (which might include comments) or linear_getIssueHistory, nor does it specify prerequisites or exclusions.

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/tacticlaunch/mcp-linear'

If you have feedback or need assistance with the MCP directory API, please join our Discord server