update_task
Modify task details in Clockify, including name, assignees, estimate, and status, by specifying workspace, project, and task IDs. Streamlines task management across projects.
Instructions
Update an existing task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assigneeIds | No | Array of assignee user IDs | |
| estimate | No | Task estimate (ISO 8601 duration) | |
| name | No | Task name | |
| projectId | Yes | Project ID | |
| status | No | Task status | |
| taskId | Yes | Task ID | |
| workspaceId | Yes | Workspace ID |
Implementation Reference
- src/index.ts:1199-1217 (handler)The core 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 formatted success response.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:519-535 (schema)The input schema definition for the 'update_task' tool, registered in the list of tools returned by ListToolsRequestSchema. Defines parameters and required fields.{ 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:777-779 (registration)The registration in the CallToolRequestSchema handler's switch statement that routes calls to the 'update_task' tool to the updateTask method, including input 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);