update_project
Modify an existing project's details including name, description, and status to reflect current information and progress.
Instructions
Update an existing project with new information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The unique identifier of the project to update | |
| name | No | New name for the project | |
| description | No | New description for the project | |
| status | No | New status for the project |
Implementation Reference
- src/tools/projects.ts:203-216 (handler)The main handler function for the 'update_project' MCP tool. It validates input using UpdateProjectSchema, logs the action, calls supabaseService.updateProject to perform the update, and returns the updated project with a success message.export const updateProject = requireAuth(async (args: any) => { const { project_id, ...updates } = UpdateProjectSchema.parse(args) logger.info('Updating project', { project_id, updates }) const project = await supabaseService.updateProject(project_id, updates) logger.info('Project updated successfully', { project_id: project.id }) return { project, message: `Project "${project.name}" updated successfully` } })
- src/tools/projects.ts:30-36 (schema)Zod schema used for input validation in the update_project tool handler.const UpdateProjectSchema = z.object({ project_id: z.string().uuid(), name: z.string().min(1).max(255).optional(), description: z.string().optional(), status: z.enum(['active', 'completed', 'archived']).optional(), // Removed priority, metadata as they don't exist in the database schema })
- src/tools/projects.ts:171-201 (registration)MCPTool registration object defining the 'update_project' tool, including name, description, and JSON input schema.export const updateProjectTool: MCPTool = { name: 'update_project', description: 'Update an existing project with new information', inputSchema: { type: 'object', properties: { project_id: { type: 'string', format: 'uuid', description: 'The unique identifier of the project to update' }, name: { type: 'string', minLength: 1, maxLength: 255, description: 'New name for the project' }, description: { type: 'string', description: 'New description for the project' }, status: { type: 'string', enum: ['active', 'completed', 'archived'], description: 'New status for the project' }, // Removed priority, metadata as they don't exist in the database schema }, required: ['project_id'] } }
- src/tools/projects.ts:778-788 (registration)Export mapping handlers to tool names, registering 'update_project' to the updateProject handler function.export const projectHandlers = { list_projects: listProjects, get_project: getProject, create_project: createProject, update_project: updateProject, get_project_context: getProjectContext, archive_project: archiveProject, duplicate_project: duplicateProject, get_project_timeline: getProjectTimeline, bulk_update_projects: bulkUpdateProjects }
- src/lib/api-client.ts:391-398 (helper)supabaseService.updateProject helper method called by the tool handler. Makes a PATCH request to the backend API to update the project.async updateProject(projectId: string, updates: Partial<Project>): Promise<Project> { const response = await this.request<{ project: Project }>(`/api/mcp/projects/${projectId}`, { method: 'PATCH', body: JSON.stringify(updates), }) return response.project }