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
| Name | Required | Description | Default |
|---|---|---|---|
| custom_field_id | Yes | Custom field ID | |
| custom_id | Yes | ClickUp custom task ID | |
| value | Yes | Value 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." ), },
- src/controllers/custom-field.controller.ts:64-94 (registration)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";