linear_updateProject
Modify existing Linear projects by updating their name, description, content, or state to reflect current progress and requirements.
Instructions
Update an existing project in Linear
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the project to update | |
| name | No | New name of the project | |
| description | No | New short summary of the project | |
| content | No | New content of the project (Markdown supported) | |
| state | No | New state of the project (e.g., 'planned', 'started', 'paused', 'completed', 'canceled') |
Implementation Reference
- The main handler function that implements the logic for the 'linear_updateProject' tool. It validates the input arguments using the isUpdateProjectArgs type guard and calls the LinearService.updateProject method to perform the update.export function handleUpdateProject(linearService: LinearService) { return async (args: unknown) => { try { if (!isUpdateProjectArgs(args)) { throw new Error('Invalid arguments for updateProject'); } return await linearService.updateProject(args); } catch (error) { logError('Error updating project', error); throw error; } };
- Defines the input and output JSON schemas for the 'linear_updateProject' tool, including parameters like project ID, name, description, content, and state.export const updateProjectToolDefinition: MCPToolDefinition = { name: 'linear_updateProject', description: 'Update an existing project in Linear', input_schema: { type: 'object', properties: { id: { type: 'string', description: 'ID of the project to update', }, name: { type: 'string', description: 'New name of the project', }, description: { type: 'string', description: 'New short summary of the project', }, content: { type: 'string', description: 'New content of the project (Markdown supported)', }, state: { type: 'string', description: "New state of the project (e.g., 'planned', 'started', 'paused', 'completed', 'canceled')", }, }, required: ['id'], }, output_schema: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, description: { type: 'string' }, state: { type: 'string' }, url: { type: 'string' }, }, }, };
- src/tools/handlers/index.ts:81-81 (registration)Registers the 'linear_updateProject' tool by mapping it to the handleUpdateProject handler function within the registerToolHandlers factory.linear_updateProject: handleUpdateProject(linearService),
- src/tools/type-guards.ts:426-444 (helper)Type guard function used to validate the input arguments for the 'linear_updateProject' tool before processing.export function isUpdateProjectArgs(args: unknown): args is { id: string; name?: string; description?: string; content?: string; state?: string; } { return ( typeof args === 'object' && args !== null && 'id' in args && typeof (args as { id: string }).id === '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') && (!('state' in args) || typeof (args as { state: string }).state === 'string') ); }