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

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