Skip to main content
Glama
wkoutre

Linear MCP Server

by wkoutre

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description indicates a read operation, which is correct. With no annotations, it carries the full burden but provides minimal behavioral context (e.g., no mention of return format or permissions). Adequate for a simple getter.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with action and resource. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple single-parameter getter, the description is sufficient. However, without an output schema, some agents might benefit from knowing the shape of the returned issue object.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description's parameter information ('by ID or identifier (e.g., ABC-123)') essentially duplicates the input schema's description. With 100% schema coverage, the description adds little extra meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and the resource ('specific issue'), and includes an example identifier format. It effectively distinguishes from sibling tools like getIssues (plural) and searchIssues.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., searchIssues, getIssues). No mention of prerequisites or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.