clickup_set_custom_field_value
Set custom field values on ClickUp tasks to update task properties and maintain accurate project data through direct API integration.
Instructions
Set a value for a custom field on a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| custom_field_id | Yes | Custom field ID | |
| task_id | Yes | ClickUp task ID | |
| value | Yes | Value to set for the custom field. Type depends on the custom field type. |
Implementation Reference
- MCP tool handler that destructures input parameters and delegates to CustomFieldService.setCustomFieldValue, returning JSON response as text content.handler: async (input) => { const { task_id, custom_field_id, value } = input; const response = await customFieldService.setCustomFieldValue( task_id, custom_field_id, value ); return { content: [{ type: "text", text: JSON.stringify(response) }], }; },
- Zod input schema validating task_id, custom_field_id, and flexible value (string, number, boolean, array, or object).inputSchema: { task_id: z.string().describe("ClickUp 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/index.ts:47-50 (registration)Specific inclusion of the setCustomFieldValueTool in the tools array used for MCP server registration.// Custom Field tools getListCustomFieldsTool, setCustomFieldValueTool, setCustomFieldValueByCustomIdTool,
- src/index.ts:89-91 (registration)Generic registration loop where all tools, including clickup_set_custom_field_value, are registered with the MCP server via server.tool().tools.forEach((tool) => { server.tool(tool.name, tool.description, tool.inputSchema, tool.handler); });
- Core helper method in CustomFieldService that performs the HTTP POST request to the ClickUp API to set the custom field value on a task.async setCustomFieldValue( taskId: string, customFieldId: string, value: any ): Promise<{ field: ClickUpCustomField }> { return this.request<{ field: ClickUpCustomField }>( `/task/${taskId}/field/${customFieldId}`, { method: "POST", body: JSON.stringify({ value }), } ); }