Skip to main content
Glama
wkoutre

Linear MCP Server

by wkoutre

linear_addIssueToProject

Add an existing issue to a Linear project to organize and track work within specific initiatives. Provide the issue ID and project ID to link them.

Instructions

Add an existing issue to a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the issue to add to the project
projectIdYesID of the project to add the issue to

Implementation Reference

  • Handler function that validates input arguments using type guard and calls the LinearService to add an issue to a project.
    export function handleAddIssueToProject(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isAddIssueToProjectArgs(args)) {
            throw new Error("Invalid arguments for addIssueToProject");
          }
          
          return await linearService.addIssueToProject(args.issueId, args.projectId);
        } catch (error) {
          logError("Error adding issue to project", error);
          throw error;
        }
      };
    }
  • MCPToolDefinition for linear_addIssueToProject, defining input schema (issueId, projectId) and output schema.
    export const addIssueToProjectToolDefinition: MCPToolDefinition = {
      name: "linear_addIssueToProject",
      description: "Add an existing issue to a project",
      input_schema: {
        type: "object",
        properties: {
          issueId: {
            type: "string",
            description: "ID or identifier of the issue to add to the project",
          },
          projectId: {
            type: "string",
            description: "ID of the project to add the issue to",
          },
        },
        required: ["issueId", "projectId"],
      },
      output_schema: {
        type: "object",
        properties: {
          success: { type: "boolean" },
          issue: {
            type: "object",
            properties: {
              id: { type: "string" },
              identifier: { type: "string" },
              title: { type: "string" },
              project: {
                type: "object",
                properties: {
                  id: { type: "string" },
                  name: { type: "string" }
                }
              }
            }
          }
        }
      }
    };
  • Registration of the linear_addIssueToProject handler in the tool handlers map within registerToolHandlers function.
    linear_updateProject: handleUpdateProject(linearService),
    linear_addIssueToProject: handleAddIssueToProject(linearService),
    linear_getProjectIssues: handleGetProjectIssues(linearService),
  • Type guard function used in the handler to validate input arguments for linear_addIssueToProject.
    /**
     * Type guard for linear_addIssueToProject tool arguments
     */
    export function isAddIssueToProjectArgs(args: unknown): args is {
      issueId: string;
      projectId: string;
    } {
      return (
        typeof args === "object" &&
        args !== null &&
        "issueId" in args &&
        typeof (args as { issueId: string }).issueId === "string" &&
        "projectId" in args &&
        typeof (args as { projectId: string }).projectId === "string"
      );
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description must disclose behavioral traits, but it only states 'Add' without revealing side effects (e.g., whether the issue must not already be in the project, or if it updates existing associations). Minimal transparency beyond the basic action.

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

Conciseness4/5

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

The description is a single sentence with no wasted words, achieving conciseness. However, the brevity limits the inclusion of useful context, so it could be better structured by adding usage hints.

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

Completeness3/5

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

Given the tool's simplicity (2 required params, no output schema), the description is minimally adequate. It lacks completeness for an agent that might need to know if the issue must exist or if the operation is idempotent, but for a basic add, it suffices.

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 input schema has 100% coverage with descriptions for both parameters ('ID or identifier' for issueId and 'ID of the project' for projectId). The description adds no additional meaning beyond the schema, so the baseline of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the action and resource: 'Add an existing issue to a project'. It uses a specific verb and resource, making the purpose understandable. However, it does not distinguish this tool from siblings like linear_addIssueToCycle or linear_removeIssueFromProject, which weakens differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives or conditions like 'when the issue is not already in a project'. There is no mention of prerequisites or context, leaving the agent to infer usage.

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