update_task
Modify existing tasks in Clockify projects by updating details like name, assignees, estimates, or status to keep time tracking accurate and organized.
Instructions
Update an existing task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Workspace ID | |
| projectId | Yes | Project ID | |
| taskId | Yes | Task ID | |
| name | No | Task name | |
| assigneeIds | No | Array of assignee user IDs | |
| estimate | No | Task estimate (ISO 8601 duration) | |
| status | No | Task status |
Implementation Reference
- src/index.ts:1199-1217 (handler)The main handler function for the 'update_task' tool. It extracts parameters from args, makes a PUT request to the Clockify API endpoint for updating a task, and returns a success message with updated task details.private async updateTask(args: any) { const { workspaceId, projectId, taskId, ...updateData } = args; const task = await this.makeRequest( `/workspaces/${workspaceId}/projects/${projectId}/tasks/${taskId}`, "PUT", updateData ); return { content: [ { type: "text", text: `Task updated successfully!\nName: ${task.name}\nStatus: ${task.status}\nEstimate: ${task.estimate || "No estimate"}`, }, ], isError: false, }; }
- src/index.ts:777-779 (registration)The switch case in the CallToolRequestSchema handler that routes calls to the 'update_task' tool to the updateTask method, including parameter validation.case "update_task": if (!args?.workspaceId || !args?.projectId || !args?.taskId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId, projectId and taskId are required'); return await this.updateTask(args as any);
- src/index.ts:520-534 (registration)The tool registration in the ListToolsRequestSchema response, defining the name, description, and input schema for 'update_task'.name: "update_task", description: "Update an existing task", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, projectId: { type: "string", description: "Project ID" }, taskId: { type: "string", description: "Task ID" }, name: { type: "string", description: "Task name" }, assigneeIds: { type: "array", items: { type: "string" }, description: "Array of assignee user IDs" }, estimate: { type: "string", description: "Task estimate (ISO 8601 duration)" }, status: { type: "string", enum: ["ACTIVE", "DONE"], description: "Task status" }, }, required: ["workspaceId", "projectId", "taskId"], },
- src/index.ts:42-49 (schema)TypeScript interface defining the structure of a Task object, used in the context of task-related tools including update_task.interface Task { id?: string; name: string; projectId: string; assigneeIds?: string[]; estimate?: string; status?: "ACTIVE" | "DONE"; }