Skip to main content
Glama
Leanware-io

ClickUp MCP Integration

by Leanware-io

clickup_set_custom_field_value_by_custom_id

Update custom field values on ClickUp tasks using their custom IDs to maintain accurate task metadata and organization in your workspace.

Instructions

Set a value for a custom field on a task using the task's custom ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
custom_field_idYesCustom field ID
custom_idYesClickUp custom task ID
valueYesValue to set for the custom field. Type depends on the custom field type.

Implementation Reference

  • Core handler logic that makes the specific POST request to ClickUp API endpoint for setting custom field value using custom task ID, including the unique query parameters custom_task_ids=true and team_id.
    async setCustomFieldValueByCustomId( customId: string, customFieldId: string, value: any ): Promise<{ field: ClickUpCustomField }> { return this.request<{ field: ClickUpCustomField }>( `/task/${customId}/field/${customFieldId}?custom_task_ids=true&team_id=${this.workspaceId}`, { method: "POST", body: JSON.stringify({ value }), } ); }
  • Input schema defined using Zod for validating custom_id, custom_field_id, and polymorphic value supporting string, number, boolean, array, or object.
    inputSchema: { custom_id: z.string().describe("ClickUp custom task ID"), custom_field_id: z.string().describe("Custom field ID"), value: z .union([ z.string(), z.number(), z.boolean(), z.array(z.unknown()), z.record(z.unknown()), ]) .describe( "Value to set for the custom field. Type depends on the custom field type." ), },
  • Defines the MCP tool using defineTool utility, specifying name, description, input schema, and handler that delegates to CustomFieldService.
    const setCustomFieldValueByCustomIdTool = defineTool((z) => ({ name: "clickup_set_custom_field_value_by_custom_id", description: "Set a value for a custom field on a task using the task's custom ID", inputSchema: { custom_id: z.string().describe("ClickUp custom task ID"), custom_field_id: z.string().describe("Custom field ID"), value: z .union([ z.string(), z.number(), z.boolean(), z.array(z.unknown()), z.record(z.unknown()), ]) .describe( "Value to set for the custom field. Type depends on the custom field type." ), }, handler: async (input) => { const { custom_id, custom_field_id, value } = input; const response = await customFieldService.setCustomFieldValueByCustomId( custom_id, custom_field_id, value ); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }, }));
  • src/index.ts:89-91 (registration)
    Registers all defined tools, including clickup_set_custom_field_value_by_custom_id, to the MCP server instance.
    tools.forEach((tool) => { server.tool(tool.name, tool.description, tool.inputSchema, tool.handler); });
  • src/index.ts:23-26 (registration)
    Imports the defined tool for registration in the main MCP server.
    getListCustomFieldsTool, setCustomFieldValueTool, setCustomFieldValueByCustomIdTool, } from "./controllers/custom-field.controller";

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