linear_updateProject
Modify project details in Linear by updating its name, description, content, or state using the project ID. Ensure accurate project management with real-time adjustments.
Instructions
Update an existing project in Linear
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | New content of the project (Markdown supported) | |
| description | No | New short summary of the project | |
| id | Yes | ID of the project to update | |
| name | No | New name of the project | |
| state | No | New state of the project (e.g., 'planned', 'started', 'paused', 'completed', 'canceled') |
Implementation Reference
- The main handler function for the linear_updateProject tool. It validates the input arguments using the isUpdateProjectArgs type guard and calls linearService.updateProject(args) 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; } };
- The tool schema definition for linear_updateProject, specifying input and output schemas.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:64-126 (registration)The registration of the linear_updateProject tool handler within the registerToolHandlers function, mapping the tool name to handleUpdateProject(linearService).export function registerToolHandlers(linearService: LinearService) { return { // User tools linear_getViewer: handleGetViewer(linearService), linear_getOrganization: handleGetOrganization(linearService), linear_getUsers: handleGetUsers(linearService), linear_getLabels: handleGetLabels(linearService), // Team tools linear_getTeams: handleGetTeams(linearService), linear_getWorkflowStates: handleGetWorkflowStates(linearService), // Project tools linear_getProjects: handleGetProjects(linearService), linear_createProject: handleCreateProject(linearService), // Project Management tools linear_updateProject: handleUpdateProject(linearService), linear_addIssueToProject: handleAddIssueToProject(linearService), linear_getProjectIssues: handleGetProjectIssues(linearService), // Cycle Management tools linear_getCycles: handleGetCycles(linearService), linear_getActiveCycle: handleGetActiveCycle(linearService), linear_addIssueToCycle: handleAddIssueToCycle(linearService), // Initiative Management tools linear_getInitiatives: getInitiativesHandler(linearService), linear_getInitiativeById: getInitiativeByIdHandler(linearService), linear_createInitiative: createInitiativeHandler(linearService), linear_updateInitiative: updateInitiativeHandler(linearService), linear_archiveInitiative: archiveInitiativeHandler(linearService), linear_unarchiveInitiative: unarchiveInitiativeHandler(linearService), linear_deleteInitiative: deleteInitiativeHandler(linearService), linear_getInitiativeProjects: getInitiativeProjectsHandler(linearService), linear_addProjectToInitiative: addProjectToInitiativeHandler(linearService), linear_removeProjectFromInitiative: removeProjectFromInitiativeHandler(linearService), // Issue tools linear_getIssues: handleGetIssues(linearService), linear_getIssueById: handleGetIssueById(linearService), linear_searchIssues: handleSearchIssues(linearService), linear_createIssue: handleCreateIssue(linearService), linear_updateIssue: handleUpdateIssue(linearService), linear_createComment: handleCreateComment(linearService), linear_addIssueLabel: handleAddIssueLabel(linearService), linear_removeIssueLabel: handleRemoveIssueLabel(linearService), // New Issue Management tools linear_assignIssue: handleAssignIssue(linearService), linear_subscribeToIssue: handleSubscribeToIssue(linearService), linear_convertIssueToSubtask: handleConvertIssueToSubtask(linearService), linear_createIssueRelation: handleCreateIssueRelation(linearService), linear_archiveIssue: handleArchiveIssue(linearService), linear_setIssuePriority: handleSetIssuePriority(linearService), linear_transferIssue: handleTransferIssue(linearService), linear_duplicateIssue: handleDuplicateIssue(linearService), linear_getIssueHistory: handleGetIssueHistory(linearService), // Comment Management tools linear_getComments: handleGetComments(linearService), }; }
- src/tools/type-guards.ts:426-444 (helper)Type guard function used by the handler to validate input arguments for the linear_updateProject tool.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') ); }