Fields

Fields define the structure of data within your CMS collections. Add text fields, numbers, dates, references to other collections, and more to create rich content structures.

When to use

Use Fields tools to:

  • Add custom fields: Define what data each collection item contains
  • Create relationships: Link collections with reference fields
  • Configure field options: Set up dropdowns, checkboxes, and radio buttons
  • Update field settings: Modify existing field configurations
  • Structure content: Define required vs. optional fields

Tool details

Tool name: data_cms_tool

Available actions

Create static field

Add static field types like text, numbers, dates, and more to a collection.

Action: create_collection_static_field

Parameters:

ParameterTypeRequiredDescription
collection_idstringYesCollection to add the field to
requestobjectYesField configuration

Request object:

1{
2 "type": "PlainText",
3 "displayName": "Blog Title",
4 "slug": "blog-title",
5 "isRequired": true,
6 "validations": {
7 "maxLength": 100
8 }
9}

Example usage:

Add a plain text field called "Author Name" to collection [collection_id]

Create option field

Add a field with predefined choices (dropdown, radio, checkbox).

Action: create_collection_option_field

Parameters:

ParameterTypeRequiredDescription
collection_idstringYesCollection to add the field to
requestobjectYesField configuration with options

Request object:

1{
2 "type": "Option",
3 "displayName": "Status",
4 "slug": "status",
5 "options": [
6 {"name": "Draft", "id": "draft"},
7 {"name": "In Review", "id": "review"},
8 {"name": "Published", "id": "published"}
9 ]
10}

Example usage:

Add a status dropdown field to collection [collection_id] with options: Draft, In Review, Published

Use option fields for consistent, controlled values like categories, statuses, or priority levels.

Create reference field

Create a field that links to items in another collection.

Action: create_collection_reference_field

Parameters:

ParameterTypeRequiredDescription
collection_idstringYesCollection to add the field to
requestobjectYesField configuration with target collection

Request object:

1{
2 "displayName": "Author",
3 "slug": "author",
4 "collectionId": "[author-collection-id]",
5 "isRequired": false
6}

Example usage:

Add a reference field called "Category" that links to the Categories collection

Reference fields create relationships between collections, allowing you to link related content without duplicating data.

Update field

Modify properties of an existing field.

Action: update_collection_field

Parameters:

ParameterTypeRequiredDescription
collection_idstringYesCollection containing the field
field_idstringYesField to update
requestobjectYesUpdated field configuration

Updatable properties:

  • Display name
  • Help text
  • Required status
  • Validation rules
  • Default values

Example usage:

Update field [field_id] in collection [collection_id] to make it required

Best practices

Before adding fields:

  • List all data points you need
  • Determine which are required vs. optional
  • Identify relationships between collections
  • Consider validation requirements

This prevents restructuring later.

Display names: Human-readable

  • ✅ “Featured Image”, “Publish Date”, “Author Name”
  • ❌ “img1”, “date”, “person”

Slugs: Code-friendly

  • ✅ “featured-image”, “publish-date”, “author-name”
  • ❌ “Image1”, “Date”, “author name”

When using reference fields, document:

  • Which collections link to which
  • Whether references are required
  • How many items can be referenced
  • What happens if referenced item is deleted

This helps maintain data integrity.

Limitations

  • Field types: Cannot change field type after creation
  • Deletion: Deleting a field deletes all data in that field
  • Slug changes: Field slugs cannot be changed after creation
  • No Validation: You cannot set validation rules for fields via the API

Deleting a field permanently removes all data stored in that field across all collection items. Export data before deletion if needed.