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
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | Yes | ID or identifier of the issue to convert (e.g., ABC-123) | |
| parentIssueId | Yes | ID 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' }, }, }, }, }, };
- src/tools/handlers/index.ts:115-115 (registration)Maps the tool name 'linear_convertIssueToSubtask' to its handler function within registerToolHandlers.linear_convertIssueToSubtask: handleConvertIssueToSubtask(linearService),
- src/tools/type-guards.ts:289-303 (helper)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' ); }