linear_getIssueById
Retrieve a specific Linear issue using its ID or identifier to access project details and status information.
Instructions
Get a specific issue by ID or identifier (e.g., ABC-123)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID or identifier of the issue (e.g., ABC-123) |
Implementation Reference
- The main handler function for the linear_getIssueById tool. It validates the input arguments using isGetIssueByIdArgs and calls linearService.getIssueById(args.id) to fetch the issue.*/ export function handleGetIssueById(linearService: LinearService) { return async (args: unknown) => { try { if (!isGetIssueByIdArgs(args)) { throw new Error('Invalid arguments for getIssueById'); } return await linearService.getIssueById(args.id); } catch (error) { logError('Error getting issue by ID', error); throw error; } };
- The MCPToolDefinition for linear_getIssueById, defining the tool's name, description, input schema (requires 'id' string), and detailed output schema./** * Tool definition for getting issue by ID */ export const getIssueByIdToolDefinition: MCPToolDefinition = { name: 'linear_getIssueById', description: 'Get a specific issue by ID or identifier (e.g., ABC-123)', input_schema: { type: 'object', properties: { id: { type: 'string', description: 'The ID or identifier of the issue (e.g., ABC-123)', }, }, required: ['id'], }, output_schema: { type: 'object', properties: { id: { type: 'string' }, identifier: { type: 'string' }, title: { type: 'string' }, description: { type: 'string' }, state: { type: 'string' }, priority: { type: 'number' }, estimate: { type: 'number' }, dueDate: { type: 'string' }, team: { type: 'object' }, assignee: { type: 'object' }, project: { type: 'object' }, cycle: { type: 'object' }, parent: { type: 'object' }, labels: { type: 'array', items: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, color: { type: 'string' }, }, }, }, sortOrder: { type: 'number' }, createdAt: { type: 'string' }, updatedAt: { type: 'string' }, url: { type: 'string' }, comments: { type: 'array' }, }, }, };
- src/tools/handlers/index.ts:104-104 (registration)Registration of the linear_getIssueById tool handler in the registerToolHandlers function, mapping the tool name to handleGetIssueById(linearService).linear_getIssueById: handleGetIssueById(linearService),
- src/tools/type-guards.ts:13-22 (helper)Type guard function isGetIssueByIdArgs used by the handler to validate input arguments for the linear_getIssueById tool.* Type guard for linear_getIssueById tool arguments */ export function isGetIssueByIdArgs(args: unknown): args is { id: string } { return ( typeof args === 'object' && args !== null && 'id' in args && typeof (args as { id: string }).id === 'string' ); }