Skip to main content
Glama
jakedx6
by jakedx6

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
NameRequiredDescriptionDefault
project_idYesThe unique identifier of the project to update
nameNoNew name for the project
descriptionNoNew description for the project
statusNoNew status for the project

Implementation Reference

  • 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` } })
  • 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 })
  • 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'] } }
  • 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 }
  • 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 }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jakedx6/helios9-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server