update_task
Modify ClickUp task details including name, description, status, assignees, and due dates to keep project information current.
Instructions
Update an existing ClickUp task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | ClickUp Task ID | |
| name | No | New task name | |
| description | No | New task description | |
| status | No | New status | |
| assignees | No | New array of assignee user IDs | |
| due_date | No | New due date in Unix timestamp (milliseconds) |
Implementation Reference
- src/index.ts:203-234 (handler)The handler function that implements the logic for updating a ClickUp task via the API, constructing update data from args and handling errors.const updateTask = async (args: any) => { try { const updateData: any = {}; if (args.name) updateData.name = args.name; if (args.description !== undefined) updateData.description = args.description; if (args.status) updateData.status = args.status; if (args.assignees) updateData.assignees = args.assignees; if (args.due_date) updateData.due_date = parseInt(args.due_date); const response = await clickupApi.put(`/task/${args.task_id}`, updateData); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { if (axios.isAxiosError(error)) { return { content: [ { type: "text", text: `ClickUp API error: ${error.response?.data?.err ?? error.message}`, }, ], isError: true, }; } throw error; } };
- src/index.ts:78-111 (schema)The input schema for the 'update_task' tool, defining the expected parameters and their types/descriptions.update_task: { description: "Update an existing ClickUp task", inputSchema: { type: "object", properties: { task_id: { type: "string", description: "ClickUp Task ID" }, name: { type: "string", description: "New task name" }, description: { type: "string", description: "New task description" }, status: { type: "string", description: "New status" }, assignees: { type: "array", items: { type: "number" }, description: "New array of assignee user IDs" }, due_date: { type: "string", description: "New due date in Unix timestamp (milliseconds)" } }, required: ["task_id"] } },
- src/index.ts:279-294 (registration)The MCP server request handler for CallToolRequestSchema, which registers and dispatches the 'update_task' tool by calling the updateTask handler.server.setRequestHandler(CallToolRequestSchema, async (request) => { // @ts-ignore const { name, arguments: args } = request.params; switch (name) { case 'get_tasks': return await getTasks(args); case 'create_task': return await createTask(args); case 'update_task': return await updateTask(args); case 'get_task': return await getTask(args); default: throw new Error(`Unknown tool: ${name}`); } });