Skip to main content
Glama
Leanware-io

ClickUp MCP Integration

by Leanware-io

clickup_update_task_by_custom_id

Modify ClickUp tasks using their custom IDs to update names, descriptions, priorities, due dates, tags, time estimates, assignees, and parent relationships.

Instructions

Update a task by its custom ID

Input Schema

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

Implementation Reference

  • Defines the MCP tool 'clickup_update_task_by_custom_id' including input schema, description, and handler function. The handler extracts parameters, constructs UpdateTaskParams, calls taskService.updateTaskByCustomId, and returns the JSON response.
    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) }],
        };
      },
    }));
  • Implements the core logic for updating a ClickUp task by custom ID via PUT request to the ClickUp API endpoint /task/{customId} with custom_task_ids=true.
    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:89-91 (registration)
    Registers all tools, including 'clickup_update_task_by_custom_id', to 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/index.ts:35-35 (registration)
    Includes the updateTaskByCustomIdTool in the tools array used for registration.
    updateTaskByCustomIdTool,
  • Exports the defined tool for use in registration.
    export {
      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