Skip to main content
Glama

linear_getIssueHistory

Retrieve the change history for a Linear issue to track modifications, understand updates, and monitor progress over time.

Instructions

Get the history of changes made to an issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the issue (e.g., ABC-123)
limitNoMaximum number of history events to return (default: 10)

Implementation Reference

  • The handler function that implements the core logic for the linear_getIssueHistory tool. It validates the input arguments using the type guard and delegates to the LinearService to fetch the issue history.
    export function handleGetIssueHistory(linearService: LinearService) { return async (args: unknown) => { try { if (!isGetIssueHistoryArgs(args)) { throw new Error("Invalid arguments for getIssueHistory"); } return await linearService.getIssueHistory(args.issueId, args.limit); } catch (error) { logError("Error getting issue history", error); throw error; } }; }
  • Defines the tool schema including name, description, input_schema (issueId required, limit optional), and output_schema for the issue history.
    export const getIssueHistoryToolDefinition: MCPToolDefinition = { name: "linear_getIssueHistory", description: "Get the history of changes made to an issue", input_schema: { type: "object", properties: { issueId: { type: "string", description: "ID or identifier of the issue (e.g., ABC-123)", }, limit: { type: "number", description: "Maximum number of history events to return (default: 10)", }, }, required: ["issueId"], }, output_schema: { type: "object", properties: { issueId: { type: "string" }, identifier: { type: "string" }, history: { type: "array", items: { type: "object", properties: { id: { type: "string" }, createdAt: { type: "string" }, actor: { type: "object" }, type: { type: "string" }, from: { type: "string" }, to: { type: "string" } } } } } } };
  • Registers the 'linear_getIssueHistory' tool name mapped to the handleGetIssueHistory handler function within the tool handlers registry.
    linear_getIssueHistory: handleGetIssueHistory(linearService),
  • Type guard function used in the handler to validate input arguments match the expected schema for issueId (required string) and optional limit (number).
    export function isGetIssueHistoryArgs(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