Skip to main content
Glama
wkoutre

Linear MCP Server

by wkoutre

linear_convertIssueToSubtask

Convert a Linear issue into a subtask by linking it to a parent issue for better project organization and hierarchy management.

Instructions

Convert an issue to a subtask

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the issue to convert (e.g., ABC-123)
parentIssueIdYesID or identifier of the parent issue (e.g., ABC-456)

Implementation Reference

  • The handler function that executes the tool logic: validates input arguments using a type guard and calls the LinearService.convertIssueToSubtask method to perform the conversion.
    export function handleConvertIssueToSubtask(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isConvertIssueToSubtaskArgs(args)) {
            throw new Error("Invalid arguments for convertIssueToSubtask");
          }
          
          return await linearService.convertIssueToSubtask(args.issueId, args.parentIssueId);
        } catch (error) {
          logError("Error converting issue to subtask", error);
          throw error;
        }
      };
    }
  • The MCP tool definition/schema specifying the tool name, description, input schema (issueId and parentIssueId required), and output schema.
    export const convertIssueToSubtaskToolDefinition: MCPToolDefinition = {
      name: "linear_convertIssueToSubtask",
      description: "Convert an issue to a subtask",
      input_schema: {
        type: "object",
        properties: {
          issueId: {
            type: "string",
            description: "ID or identifier of the issue to convert (e.g., ABC-123)",
          },
          parentIssueId: {
            type: "string",
            description: "ID or identifier of the parent issue (e.g., ABC-456)",
          },
        },
        required: ["issueId", "parentIssueId"],
      },
      output_schema: {
        type: "object",
        properties: {
          success: { type: "boolean" },
          issue: {
            type: "object",
            properties: {
              id: { type: "string" },
              identifier: { type: "string" },
              title: { type: "string" },
              parent: { type: "object" },
              url: { type: "string" }
            }
          }
        }
      }
    };
  • Registration of the tool in the handlers map returned by registerToolHandlers function, mapping tool name to the handler instance.
    linear_convertIssueToSubtask: handleConvertIssueToSubtask(linearService),
  • Type guard function used by the handler to validate the tool's input arguments (issueId and parentIssueId as strings).
     */
    export function isConvertIssueToSubtaskArgs(args: unknown): args is {
      issueId: string;
      parentIssueId: string;
    } {
      return (
        typeof args === "object" &&
        args !== null &&
        "issueId" in args &&
        typeof (args as { issueId: string }).issueId === "string" &&
        "parentIssueId" in args &&
        typeof (args as { parentIssueId: string }).parentIssueId === "string"
      );
    }
  • LinearService method implementing the core logic: fetches issues, updates the issue's parentId using Linear SDK, and returns formatted success response with updated issue data.
    async convertIssueToSubtask(issueId: string, parentIssueId: string) {
      try {
        // Get both issues
        const issue = await this.client.issue(issueId);
        if (!issue) {
          throw new Error(`Issue with ID ${issueId} not found`);
        }
    
        const parentIssue = await this.client.issue(parentIssueId);
        if (!parentIssue) {
          throw new Error(`Parent issue with ID ${parentIssueId} not found`);
        }
    
        // Convert the issue to a subtask
        const updatedIssue = await issue.update({
          parentId: parentIssueId,
        });
    
        // Get parent data - we need to fetch the updated issue to get relationships
        const updatedIssueData = await this.client.issue(issue.id);
        const parentData =
          updatedIssueData && updatedIssueData.parent ? await updatedIssueData.parent : null;
    
        return {
          success: true,
          issue: {
            id: issue.id,
            identifier: issue.identifier,
            title: issue.title,
            parent: parentData
              ? {
                  id: parentData.id,
                  identifier: parentData.identifier,
                  title: parentData.title,
                }
              : null,
            url: issue.url,
          },
        };
      } catch (error) {
        console.error('Error converting issue to subtask:', error);
        throw error;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('convert') but doesn't disclose key traits: whether this is a destructive mutation (e.g., alters issue properties irreversibly), requires specific permissions, has side effects on related issues, or what the expected outcome looks like. This leaves significant gaps for an agent to understand the tool's behavior.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action, though it could be slightly more informative. There's no wasted text, making it appropriately concise for a simple tool.

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

Completeness2/5

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

Given the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'convert' entails behaviorally, the result of the operation, or error conditions. For a tool that likely changes issue relationships in a system like Linear, more context is needed to guide an agent effectively.

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 schema description coverage is 100%, with both parameters ('issueId' and 'parentIssueId') well-documented in the schema. The description adds no additional meaning beyond the schema, such as explaining the relationship between the issue and parent or any constraints. Since the schema handles the parameter documentation adequately, a baseline score of 3 is appropriate.

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

Purpose3/5

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

The description 'Convert an issue to a subtask' clearly states the verb ('convert') and resource ('issue'), but it's vague about what this transformation entails—does it change the issue's type, move it under a parent, or modify its properties? It distinguishes from siblings like 'linear_createIssue' or 'linear_updateIssue' by specifying a conversion action, but lacks specificity about the outcome.

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 is provided on when to use this tool versus alternatives. For example, it doesn't clarify if this is for restructuring tasks versus using 'linear_createIssueRelation' for linking issues, or mention prerequisites like issue states. The description implies a specific use case but offers no explicit when/when-not instructions or comparisons to sibling tools.

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

Install Server

Other Tools

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