Skip to main content
Glama

linear_convertIssueToSubtask

Convert a Linear issue into a subtask by linking it to a parent issue, organizing project work into hierarchical relationships.

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

  • Handler function that validates input args using type guard and delegates to LinearService.convertIssueToSubtask 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;
        }
      };
    }
  • Tool schema definition including input/output schemas for linear_convertIssueToSubtask.
    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 handler in the registerToolHandlers function.
    linear_convertIssueToSubtask: handleConvertIssueToSubtask(linearService),
  • Type guard function for validating input arguments of the linear_convertIssueToSubtask tool.
     * Type guard for linear_convertIssueToSubtask tool arguments
     */
    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'
      );
    }

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/tacticlaunch/mcp-linear'

If you have feedback or need assistance with the MCP directory API, please join our Discord server