linear_removeProjectFromInitiative
Disassociate a project from an initiative in the Linear project management system by specifying the initiative ID and project ID.
Instructions
Remove a project from an initiative
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| initiativeId | Yes | The ID of the initiative | |
| projectId | Yes | The ID of the project to remove |
Implementation Reference
- Handler function for linear_removeProjectFromInitiative tool. Validates input args using isRemoveProjectFromInitiativeInput type guard, logs the action, calls linearService.removeProjectFromInitiative(initiativeId, projectId), logs success, and returns the result.export function removeProjectFromInitiativeHandler(linearService: LinearService) { return async (args: unknown) => { if (!isRemoveProjectFromInitiativeInput(args)) { throw new Error('Invalid input for removeProjectFromInitiative'); } console.log( `[removeProjectFromInitiative] Removing project ${args.projectId} from initiative ${args.initiativeId}`, ); const result = await linearService.removeProjectFromInitiative( args.initiativeId, args.projectId, ); console.log(`[removeProjectFromInitiative] Project removed successfully`); return result; }; }
- Schema definition for the linear_removeProjectFromInitiative tool, specifying input (initiativeId, projectId required) and output schema.{ name: 'linear_removeProjectFromInitiative', description: 'Remove a project from an initiative', input_schema: { type: 'object', properties: { initiativeId: { type: 'string', description: 'The ID of the initiative', }, projectId: { type: 'string', description: 'The ID of the project to remove', }, }, required: ['initiativeId', 'projectId'], }, output_schema: { type: 'object', properties: { success: { type: 'boolean' }, message: { type: 'string' }, project: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, }, }, initiative: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, }, }, }, }, },
- src/tools/handlers/index.ts:100-100 (registration)Registration of the tool handler in the registerToolHandlers function, mapping 'linear_removeProjectFromInitiative' to removeProjectFromInitiativeHandler(linearService). Imported from './initiative-handlers.js'.linear_removeProjectFromInitiative: removeProjectFromInitiativeHandler(linearService),
- src/tools/type-guards.ts:874-890 (helper)Type guard function isRemoveProjectFromInitiativeInput used in the handler to validate input arguments (initiativeId and projectId as strings)./** * Type guard for linear_removeProjectFromInitiative tool arguments */ export function isRemoveProjectFromInitiativeInput(args: unknown): args is { initiativeId: string; projectId: string; } { return ( typeof args === 'object' && args !== null && 'initiativeId' in args && typeof (args as { initiativeId: string }).initiativeId === 'string' && 'projectId' in args && typeof (args as { projectId: string }).projectId === 'string' ); }