Skip to main content
Glama

linear_getIssueById

Retrieve a specific issue from Linear project management using its ID or identifier (like ABC-123) to access details and manage tasks.

Instructions

Get a specific issue by ID or identifier (e.g., ABC-123)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID or identifier of the issue (e.g., ABC-123)

Implementation Reference

  • The main handler function that implements the linear_getIssueById tool logic. It validates the input arguments using the isGetIssueByIdArgs type guard and delegates to LinearService.getIssueById to fetch and return the specific 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; } }; }
  • Defines the MCP tool schema for linear_getIssueById, specifying input (id: string required) and comprehensive output schema for issue details.
    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" } } } };
  • Registers the tool name 'linear_getIssueById' to the handleGetIssueById handler function (curried with LinearService instance) within the registerToolHandlers export.
    linear_getIssueById: handleGetIssueById(linearService),
  • Type guard utility function used by the handler to validate and type-narrow the tool's input arguments to ensure 'id' is a string.
    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" ); }

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