Skip to main content
Glama
wkoutre

Linear MCP Server

by wkoutre

linear_getComments

Retrieve all comments for a specific Linear issue to track discussions and updates, with configurable limits for efficient review.

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

  • The handler function that implements the core logic for linear_getComments: validates input with isGetCommentsArgs 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;
        }
      };
  • The MCPToolDefinition for linear_getComments, specifying input (issueId required, optional limit) 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 in the registerToolHandlers function, mapping it to handleGetComments.
    linear_getComments: handleGetComments(linearService)
  • Type guard isGetCommentsArgs for validating tool input arguments (issueId required, limit optional).
     * 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 full burden. It states a read operation ('Get') but lacks details on permissions, rate limits, pagination (beyond the 'limit' parameter), error handling, or return format. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 that front-loads the core action ('Get all comments for an issue') with zero wasted words. It's appropriately sized for a simple retrieval tool, 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 no annotations, no output schema, and a simple input schema, the description is incomplete. It doesn't address behavioral aspects like authentication needs, response structure, or error cases. For a tool in a context with many sibling alternatives, more guidance would help an agent use it correctly.

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%, with clear parameter documentation in the schema. The description adds no additional meaning beyond implying retrieval of comments, which is already covered by the tool name and purpose. Baseline 3 is appropriate as the schema handles parameter semantics adequately.

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 tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'linear_getIssueHistory' or 'linear_getIssueById' which might also retrieve issue-related data, missing explicit distinction.

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. With siblings like 'linear_getIssueHistory' (which might include comments) and 'linear_getIssueById' (which might return issue details with comments), there's no indication of context, prerequisites, or exclusions for this specific comment-fetching tool.

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

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