Skip to main content
Glama
wkoutre

Linear MCP Server

by wkoutre

linear_createIssueRelation

Link Linear issues to show dependencies like blocks, duplicates, or related items using issue IDs and relation types.

Instructions

Create relations between issues (blocks, is blocked by, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the first issue (e.g., ABC-123)
relatedIssueIdYesID or identifier of the second issue (e.g., ABC-456)
typeYesType of relation: 'blocks', 'blocked_by', 'related', 'duplicate', 'duplicate_of'

Implementation Reference

  • Handler function for the linear_createIssueRelation tool. Validates input using isCreateIssueRelationArgs type guard and delegates to LinearService.createIssueRelation.
    export function handleCreateIssueRelation(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isCreateIssueRelationArgs(args)) {
            throw new Error("Invalid arguments for createIssueRelation");
          }
          
          return await linearService.createIssueRelation(args.issueId, args.relatedIssueId, args.type);
        } catch (error) {
          logError("Error creating issue relation", error);
          throw error;
        }
      };
    }
  • Tool definition for linear_createIssueRelation, including input schema (issueId, relatedIssueId, type) and output schema.
    export const createIssueRelationToolDefinition: MCPToolDefinition = {
      name: "linear_createIssueRelation",
      description: "Create relations between issues (blocks, is blocked by, etc.)",
      input_schema: {
        type: "object",
        properties: {
          issueId: {
            type: "string",
            description: "ID or identifier of the first issue (e.g., ABC-123)",
          },
          relatedIssueId: {
            type: "string",
            description: "ID or identifier of the second issue (e.g., ABC-456)",
          },
          type: {
            type: "string",
            description: "Type of relation: 'blocks', 'blocked_by', 'related', 'duplicate', 'duplicate_of'",
            enum: ["blocks", "blocked_by", "related", "duplicate", "duplicate_of"]
          },
        },
        required: ["issueId", "relatedIssueId", "type"],
      },
      output_schema: {
        type: "object",
        properties: {
          success: { type: "boolean" },
          relation: {
            type: "object",
            properties: {
              id: { type: "string" },
              type: { type: "string" },
              issueIdentifier: { type: "string" },
              relatedIssueIdentifier: { type: "string" }
            }
          }
        }
      }
    };
  • Registration of the linear_createIssueRelation handler in the tool handlers map returned by registerToolHandlers.
    linear_createIssueRelation: handleCreateIssueRelation(linearService),
  • Type guard function used in the handler to validate arguments for linear_createIssueRelation.
    export function isCreateIssueRelationArgs(args: unknown): args is {
      issueId: string;
      relatedIssueId: string;
      type: "blocks" | "blocked_by" | "related" | "duplicate" | "duplicate_of";
    } {
      return (
        typeof args === "object" &&
        args !== null &&
        "issueId" in args &&
        typeof (args as { issueId: string }).issueId === "string" &&
        "relatedIssueId" in args &&
        typeof (args as { relatedIssueId: string }).relatedIssueId === "string" &&
        "type" in args &&
        typeof (args as { type: string }).type === "string" &&
        ["blocks", "blocked_by", "related", "duplicate", "duplicate_of"].includes((args as { type: string }).type)
      );
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior2/5

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

No annotations exist, so the description carries full burden. It only states the action (create) without disclosing side effects like overwriting existing relations, permission requirements, or error handling. The description provides minimal behavioral context beyond the basic operation.

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?

The description is a single, concise sentence that conveys the tool's purpose without extra words. It is front-loaded with the essential verb and resource.

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 create tool with no output schema, the description is largely complete. However, it could mention that relations are bidirectional (e.g., 'blocks' implies the reverse) or what happens on duplication. Still, it adequately covers the core function.

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?

Schema coverage is 100%, so the input schema already documents each parameter with descriptions and examples. The description adds a parenthetical summary of types but no extra meaning beyond the schema's enum list, resulting in marginal added value.

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 tool creates relations between issues, with examples of relation types ('blocks, is blocked by, etc.'). It distinguishes from siblings like linear_createIssue (creates issue) and linear_updateIssue (updates fields).

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

Usage Guidelines3/5

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

The description implies usage (to create relations) but does not explicitly state when to use versus alternatives like updating an issue or duplicating. No exclusions or alternate tools are referenced.

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