Skip to main content
Glama

linear_convertIssueToSubtask

Convert a Linear issue into a subtask by linking it to a parent issue using the issue and parent issue IDs. Simplify task hierarchy and organization in Linear projects.

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 core handler function that performs input validation and delegates to LinearService.convertIssueToSubtask to execute the tool logic.
    /** * Handler for converting an issue to a subtask */ 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; } }; }
  • MCP tool definition specifying name, description, input schema (issueId, parentIssueId), and output schema.
    /** * Tool definition for converting an issue to a subtask */ 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' }, }, }, }, }, };
  • Maps the tool name 'linear_convertIssueToSubtask' to its handler function within registerToolHandlers.
    linear_convertIssueToSubtask: handleConvertIssueToSubtask(linearService),
  • Type guard function validating input arguments (issueId and parentIssueId) used by the handler.
    * 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