linear_updateInitiative
Modify an existing initiative's details such as name, description, status, target date, owner, or visual attributes in Linear project management.
Instructions
Update an existing initiative
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| initiativeId | Yes | The ID of the initiative to update | |
| name | No | Updated name of the initiative | |
| description | No | Updated description of the initiative | |
| content | No | Updated content in markdown format | |
| ownerId | No | Updated owner ID | |
| targetDate | No | Updated target completion date (ISO 8601 format) | |
| status | No | Updated status of the initiative | |
| icon | No | Updated icon emoji | |
| color | No | Updated color in hex format |
Implementation Reference
- The main handler function for the linear_updateInitiative tool. It validates the input using a type guard, extracts initiativeId and updateData, calls the LinearService to update the initiative, and returns the result.export function updateInitiativeHandler(linearService: LinearService) { return async (args: unknown) => { if (!isUpdateInitiativeInput(args)) { throw new Error('Invalid input for updateInitiative'); } const { initiativeId, ...updateData } = args; console.log(`[updateInitiative] Updating initiative: ${initiativeId}`); const result = await linearService.updateInitiative(initiativeId, updateData); console.log(`[updateInitiative] Initiative updated successfully`); return result; }; }
- The tool definition including input and output schemas for linear_updateInitiative.{ name: 'linear_updateInitiative', description: 'Update an existing initiative', input_schema: { type: 'object', properties: { initiativeId: { type: 'string', description: 'The ID of the initiative to update', }, name: { type: 'string', description: 'Updated name of the initiative', }, description: { type: 'string', description: 'Updated description of the initiative', }, content: { type: 'string', description: 'Updated content in markdown format', }, ownerId: { type: 'string', description: 'Updated owner ID', }, targetDate: { type: 'string', description: 'Updated target completion date (ISO 8601 format)', }, status: { type: 'string', description: 'Updated status of the initiative', enum: ['notStarted', 'inProgress', 'completed', 'paused'], }, icon: { type: 'string', description: 'Updated icon emoji', }, color: { type: 'string', description: 'Updated color in hex format', }, }, required: ['initiativeId'], }, output_schema: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, description: { type: 'string' }, status: { type: 'string' }, url: { type: 'string' }, }, }, },
- src/tools/handlers/index.ts:94-94 (registration)Registration of the linear_updateInitiative tool handler in the registerToolHandlers function.linear_updateInitiative: updateInitiativeHandler(linearService),
- src/tools/type-guards.ts:783-811 (helper)Type guard function used in the handler to validate input arguments for linear_updateInitiative.* Type guard for linear_updateInitiative tool arguments */ export function isUpdateInitiativeInput(args: unknown): args is { initiativeId: string; name?: string; description?: string; content?: string; ownerId?: string; targetDate?: string; status?: string; icon?: string; color?: string; } { return ( typeof args === 'object' && args !== null && 'initiativeId' in args && typeof (args as { initiativeId: string }).initiativeId === 'string' && (!('name' in args) || typeof (args as { name: string }).name === 'string') && (!('description' in args) || typeof (args as { description: string }).description === 'string') && (!('content' in args) || typeof (args as { content: string }).content === 'string') && (!('ownerId' in args) || typeof (args as { ownerId: string }).ownerId === 'string') && (!('targetDate' in args) || typeof (args as { targetDate: string }).targetDate === 'string') && (!('status' in args) || typeof (args as { status: string }).status === 'string') && (!('icon' in args) || typeof (args as { icon: string }).icon === 'string') && (!('color' in args) || typeof (args as { color: string }).color === 'string') ); }