CRM: Define field
crm_define_fieldCreate or change one of the workspace's lead fields. New field: key (a-z, 0-9, _; 2–40 chars), label_uk, type, options for enum/multi_enum. Existing field: change labels / filterable / indexed / required / order, add options ('add_options'), remove options ('remove_options'), change 'type', or 'archived': true. A change that touches stored values (type change, removing a used option, archiving) reports how many leads it affects; values that cannot be kept need 'drop_unconvertible': true. dry_run=true returns that impact without writing. Proposed for confirmation like every write. At most 50 fields, 10 indexed. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>"
},
"name": "crm_define_field"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| type | No | ||
| order | No | ||
| dry_run | No | ||
| indexed | No | ||
| options | No | ||
| archived | No | ||
| label_en | No | ||
| label_uk | No | ||
| required | No | ||
| filterable | No | ||
| add_options | No | ||
| remove_options | No | ||
| drop_unconvertible | No |