Skip to main content
Glama
Leanware-io

ClickUp MCP Integration

by Leanware-io

clickup_update_task_by_custom_id

Update ClickUp tasks using custom IDs to modify name, description, priority, due dates, tags, time estimates, assignees, or parent relationships.

Instructions

Update a task by its custom ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assigneesNoUser IDs to add or remove from the task
custom_idYesClickUp custom task ID
due_dateNoDue date as Unix timestamp in milliseconds
markdown_descriptionNoTask description in markdown format
nameNoTask name
parentNoParent task ID to move this task as a subtask
priorityNoTask priority (1-4): 1=Urgent, 2=High, 3=Normal, 4=Low
tagsNoArray of tag names to add to the task
time_estimateNoTime estimate in milliseconds

Implementation Reference

  • Tool handler: destructures input, builds UpdateTaskParams from updateData, calls taskService.updateTaskByCustomId(custom_id, taskParams), returns JSON stringified response as text content.
    handler: async (input): Promise<any> => { const { custom_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.updateTaskByCustomId( custom_id, taskParams ); return { content: [{ type: "text", text: JSON.stringify(response) }], }; },
  • Zod input schema defining parameters for updating a task by custom ID, including optional fields like name, description, priority, due_date, tags, time_estimate, assignees (add/rem), and parent.
    inputSchema: { custom_id: z.string().describe("ClickUp custom 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"), },
  • Defines the tool using defineTool, specifying name, description, inputSchema, and handler. Exported for use in index.ts.
    const updateTaskByCustomIdTool = defineTool((z) => ({ name: "clickup_update_task_by_custom_id", description: "Update a task by its custom ID", inputSchema: { custom_id: z.string().describe("ClickUp custom 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 { custom_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.updateTaskByCustomId( custom_id, taskParams ); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }, }));
  • Service method implementing the update by sending PUT request to ClickUp API endpoint /task/{customId} with custom_task_ids=true query param and params as JSON body.
    async updateTaskByCustomId( customId: string, params: UpdateTaskParams ): Promise<ClickUpTask> { return this.request<ClickUpTask>( `/task/${customId}?custom_task_ids=true&team_id=${this.workspaceId}`, { method: "PUT", body: JSON.stringify(params), } ); }
  • src/index.ts:9-35 (registration)
    Imports the tool from task.controller and registers it to the MCP server along with other tools by calling server.tool() in a loop.
    updateTaskByCustomIdTool, } from "./controllers/task.controller"; import { searchDocsTool, createDocTool, getDocPagesTool, getPageTool, createPageTool, editPageTool, } from "./controllers/docs.controller"; import { getSpacesTool } from "./controllers/space.controller"; import { getFoldersTool } from "./controllers/folder.controller"; import { getListsTool, createListTool } from "./controllers/list.controller"; import { getListCustomFieldsTool, setCustomFieldValueTool, setCustomFieldValueByCustomIdTool, } from "./controllers/custom-field.controller"; import { getListAssigneesTool } from "./controllers/assignee.controller"; const tools = [ // Task tools getTaskByCustomIdTool, getTaskTool, createTaskTool, updateTaskTool, updateTaskByCustomIdTool,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Leanware-io/clickup-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server