linear_archiveInitiative
Archive initiatives in Linear to remove them from active workflows while preserving historical data for reference.
Instructions
Archive an initiative
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| initiativeId | Yes | The ID of the initiative to archive |
Implementation Reference
- The core handler function for the linear_archiveInitiative tool. It validates the input using isArchiveInitiativeInput type guard and delegates to linearService.archiveInitiative(initiativeId). Includes logging.export function archiveInitiativeHandler(linearService: LinearService) { return async (args: unknown) => { if (!isArchiveInitiativeInput(args)) { throw new Error('Invalid input for archiveInitiative'); } console.log(`[archiveInitiative] Archiving initiative: ${args.initiativeId}`); const result = await linearService.archiveInitiative(args.initiativeId); console.log(`[archiveInitiative] Initiative archived successfully`); return result; }; }
- Defines the tool schema including input (initiativeId string required) and output (success boolean).{ name: 'linear_archiveInitiative', description: 'Archive an initiative', input_schema: { type: 'object', properties: { initiativeId: { type: 'string', description: 'The ID of the initiative to archive', }, }, required: ['initiativeId'], }, output_schema: { type: 'object', properties: { success: { type: 'boolean' }, }, }, },
- src/tools/handlers/index.ts:95-95 (registration)Registers the tool name 'linear_archiveInitiative' to the archiveInitiativeHandler function within the registerToolHandlers map.linear_archiveInitiative: archiveInitiativeHandler(linearService),
- src/tools/type-guards.ts:813-825 (helper)Type guard function isArchiveInitiativeInput used in the handler to validate tool arguments contain a valid initiativeId string./** * Type guard for linear_archiveInitiative tool arguments */ export function isArchiveInitiativeInput(args: unknown): args is { initiativeId: string; } { return ( typeof args === 'object' && args !== null && 'initiativeId' in args && typeof (args as { initiativeId: string }).initiativeId === 'string' ); }