Skip to main content
Glama

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") ); }

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