update_project
Modify project details such as name, client, visibility, billing status, color, or archive state in Clockify by specifying workspace and project IDs.
Instructions
Update an existing project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| archived | No | Whether project is archived | |
| billable | No | Whether project is billable | |
| clientId | No | Client ID | |
| color | No | Project color (hex code) | |
| isPublic | No | Whether project is public | |
| name | No | Project name | |
| projectId | Yes | Project ID | |
| workspaceId | Yes | Workspace ID |
Implementation Reference
- src/index.ts:1096-1114 (handler)The main handler function for the 'update_project' tool. It extracts workspaceId, projectId, and updateData from arguments, makes a PUT request to the Clockify API endpoint `/workspaces/{workspaceId}/projects/{projectId}` with the update data, and returns a success message with updated project details.private async updateProject(args: any) { const { workspaceId, projectId, ...updateData } = args; const project = await this.makeRequest( `/workspaces/${workspaceId}/projects/${projectId}`, "PUT", updateData ); return { content: [ { type: "text", text: `Project updated successfully!\nName: ${project.name}\nClient: ${project.clientName || "No client"}\nBillable: ${project.billable}`, }, ], isError: false, }; }
- src/index.ts:443-459 (registration)The tool registration entry in the list of tools provided to ListToolsRequestSchema. Includes the tool name, description, and detailed input schema defining parameters like workspaceId, projectId, name, clientId, etc.name: "update_project", description: "Update an existing project", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, projectId: { type: "string", description: "Project ID" }, name: { type: "string", description: "Project name" }, clientId: { type: "string", description: "Client ID" }, isPublic: { type: "boolean", description: "Whether project is public" }, billable: { type: "boolean", description: "Whether project is billable" }, color: { type: "string", description: "Project color (hex code)" }, archived: { type: "boolean", description: "Whether project is archived" }, }, required: ["workspaceId", "projectId"], }, },
- src/index.ts:760-762 (registration)The dispatch case in the CallToolRequestSchema handler that validates required arguments and calls the updateProject method.case "update_project": if (!args?.workspaceId || !args?.projectId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId and projectId are required'); return await this.updateProject(args as any);