Update a field
cms_fields_updateUpdates displayName, description, required, isUnique, example, and (for option fields only) config; type and targetCollectionId are immutable. Setting required: true is rejected until every active item has a valid value for the field. Setting isUnique: true enforces uniqueness on all future writes and fails with a conflict when existing values already collide; unique is not supported for plain_text, markdown, multi_reference, image, gallery, or file fields. Pass key to rename the field’s key: the key is atomically migrated in every stored item’s data in the same transaction (no values are lost), a conflict is returned when the new key is already used in the collection, and when the website has a published version the rename is validated against the published site’s content queries. Pass position: "first" or "last", or "before" / "after" together with anchorFieldId, to move the field within the collection’s display order.
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": {
"fieldId": "<fieldId>"
},
"name": "cms_fields_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | New key for the field — a rename. Omit to keep the current key. Atomically migrates the key in every stored item’s `data`, so no values are lost. | |
| config | No | ||
| example | No | ||
| fieldId | Yes | ||
| isUnique | No | ||
| position | No | Moves the field within the collection’s display order. Omit to leave the order unchanged. `"before"` / `"after"` require `anchorFieldId`. | |
| required | No | ||
| description | No | ||
| displayName | No | ||
| anchorFieldId | No | Sibling field to move against when `position` is `"before"` or `"after"`. |