update_project
Modify existing Clockify project details including name, client, billing status, visibility, color, and archival state to maintain accurate time tracking records.
Instructions
Update an existing project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Workspace ID | |
| projectId | Yes | Project ID | |
| name | No | Project name | |
| clientId | No | Client ID | |
| isPublic | No | Whether project is public | |
| billable | No | Whether project is billable | |
| color | No | Project color (hex code) | |
| archived | No | Whether project is archived |
Implementation Reference
- src/index.ts:1096-1114 (handler)The `updateProject` method implements the core logic for updating a project via a PUT request to the Clockify API endpoint `/workspaces/{workspaceId}/projects/{projectId}`.
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:445-458 (schema)Input schema defining parameters for the `update_project` tool, including required workspaceId and projectId.
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:442-459 (registration)Tool registration in the `ListToolsRequestSchema` handler, defining name, description, and input schema for `update_project`.
{ 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)Dispatch case in `CallToolRequestSchema` handler that routes `update_project` calls to the `updateProject` method after parameter validation.
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);