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
| 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
- 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' }, }, }, }, }, };
- src/tools/handlers/index.ts:115-115 (registration)Registration of the tool handler in the registerToolHandlers function.linear_convertIssueToSubtask: handleConvertIssueToSubtask(linearService),
- src/tools/type-guards.ts:289-303 (schema)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' ); }