Add a field to a collection
cms_fields_createAdds a typed field at the end of the collection’s field order. key is lowercase snake_case (max 64 characters), must be unique in the collection, and cannot use the reserved metadata names id, slug, publishedAt, publishAt, createdAt, updatedAt, or position; type is immutable after creation. reference and multi_reference fields require a targetCollectionId in the same website, and option fields require config.choices (1–1,000 choices). A collection can hold at most 100 fields, and required: true is rejected while the collection has active items — add the field as optional, backfill every item, then mark it required.
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>",
"displayName": "<displayName>",
"type": "<type>",
"collectionId": "<collectionId>"
},
"name": "cms_fields_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| type | Yes | ||
| config | No | ||
| example | No | ||
| isUnique | No | ||
| required | No | ||
| description | No | ||
| displayName | Yes | ||
| collectionId | Yes | ||
| targetCollectionId | No |