linear_unarchiveInitiative
Restore archived initiatives in the Linear project management system by specifying the initiative ID, enabling continued tracking and workflow integration.
Instructions
Unarchive an initiative
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| initiativeId | Yes | The ID of the initiative to unarchive |
Implementation Reference
- The main execution handler for the linear_unarchiveInitiative tool. Validates input using type guard, logs the action, calls LinearService.unarchiveInitiative with the initiative ID, and returns the result.export function unarchiveInitiativeHandler(linearService: LinearService) { return async (args: unknown) => { if (!isArchiveInitiativeInput(args)) { throw new Error('Invalid input for unarchiveInitiative'); } console.log(`[unarchiveInitiative] Unarchiving initiative: ${args.initiativeId}`); const result = await linearService.unarchiveInitiative(args.initiativeId); console.log(`[unarchiveInitiative] Initiative unarchived successfully`); return result; }; }
- The MCPToolDefinition object defining the tool's name, description, input schema (requiring initiativeId string), and output schema (success boolean).{ name: 'linear_unarchiveInitiative', description: 'Unarchive an initiative', input_schema: { type: 'object', properties: { initiativeId: { type: 'string', description: 'The ID of the initiative to unarchive', }, }, required: ['initiativeId'], }, output_schema: { type: 'object', properties: { success: { type: 'boolean' }, }, }, },
- src/tools/handlers/index.ts:96-96 (registration)Registration of the tool in the handlers map returned by registerToolHandlers, mapping 'linear_unarchiveInitiative' to the instantiated unarchiveInitiativeHandler.linear_unarchiveInitiative: unarchiveInitiativeHandler(linearService),
- src/tools/type-guards.ts:816-825 (helper)Type guard isArchiveInitiativeInput used by the handler to validate input (shared with archiveInitiative; checks for initiativeId string). Note: A separate isUnarchiveInitiativeArgs exists but is not used.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' ); }