clickup_update_task
Modify ClickUp task details including name, description, priority, due date, tags, time estimates, assignees, and parent relationships using the task ID.
Instructions
Update a task by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assignees | No | User IDs to add or remove from the task | |
| due_date | No | Due date as Unix timestamp in milliseconds | |
| markdown_description | No | Task description in markdown format | |
| name | No | Task name | |
| parent | No | Parent task ID to move this task as a subtask | |
| priority | No | Task priority (1-4): 1=Urgent, 2=High, 3=Normal, 4=Low | |
| tags | No | Array of tag names to add to the task | |
| task_id | Yes | ClickUp task ID | |
| time_estimate | No | Time estimate in milliseconds |
Implementation Reference
- Full tool definition for 'clickup_update_task', including name, description, input schema (Zod), and handler function that calls the task service.const updateTaskTool = defineTool((z) => ({ name: "clickup_update_task", description: "Update a task by its ID", inputSchema: { task_id: z.string().describe("ClickUp task ID"), name: z.string().optional().describe("Task name"), markdown_description: z .string() .optional() .describe("Task description in markdown format"), priority: z .number() .optional() .describe("Task priority (1-4): 1=Urgent, 2=High, 3=Normal, 4=Low"), due_date: z .number() .optional() .describe("Due date as Unix timestamp in milliseconds"), tags: z .array(z.string()) .optional() .describe("Array of tag names to add to the task"), time_estimate: z .number() .optional() .describe("Time estimate in milliseconds"), assignees: z .object({ add: z .array(z.number()) .optional() .describe("Array of user IDs to add to the task"), rem: z .array(z.number()) .optional() .describe("Array of user IDs to remove from the task"), }) .optional() .describe("User IDs to add or remove from the task"), parent: z .string() .optional() .describe("Parent task ID to move this task as a subtask"), }, handler: async (input): Promise<any> => { const { task_id, ...updateData } = input; const taskParams: UpdateTaskParams = { name: updateData.name, markdown_description: updateData.markdown_description, priority: updateData.priority, due_date: updateData.due_date, tags: updateData.tags, time_estimate: updateData.time_estimate, assignees: updateData.assignees, parent: updateData.parent, }; const response = await taskService.updateTask(task_id, taskParams); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }, }));
- src/index.ts:89-91 (registration)Registers the clickup_update_task tool (along with others) on the MCP server by calling server.tool() in a loop over the tools array.tools.forEach((tool) => { server.tool(tool.name, tool.description, tool.inputSchema, tool.handler); });
- src/services/task.service.ts:55-63 (helper)Core implementation of task update: sends PUT request to ClickUp API /task/{taskId} with the update parameters.async updateTask( taskId: string, params: UpdateTaskParams ): Promise<ClickUpTask> { return this.request<ClickUpTask>(`/task/${taskId}`, { method: "PUT", body: JSON.stringify(params), }); }
- src/models/types.ts:40-53 (schema)TypeScript interface UpdateTaskParams used for input validation and typing in the updateTask method.export interface UpdateTaskParams { name?: string; description?: string; markdown_description?: string; // Task description in markdown format priority?: number; // 1 (Urgent), 2 (High), 3 (Normal), 4 (Low) due_date?: number; // Unix timestamp in milliseconds tags?: string[]; // Array of tag names time_estimate?: number; // Time estimate in milliseconds assignees?: { add?: number[]; // Array of user IDs to add to the task rem?: number[]; // Array of user IDs to remove from the task }; parent?: string; // Parent task ID to move this task as a subtask }