create_field
Adds a database column and its Directus interface metadata to an existing collection. Use it for plain fields, create_relationship for relational ones, and update_field to modify a field that already exists.
Instructions
Adds a field to an existing collection: a database column plus its Directus interface metadata. Use create_relationship for relational fields, since this tool creates a plain column and no foreign key, and update_field for a field that already exists. The column is added immediately; on a non-empty table a required field without default_value can fail or leave existing rows invalid, so add it optional first and backfill. type is the Directus type (string, integer, boolean, dateTime, json, uuid and so on) while interface only affects how the admin app renders it. Returns the created field definition.
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": {
"collection": "<collection>",
"field": "<field>",
"type": "<type>"
},
"name": "create_field"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Field note | |
| type | Yes | Field type | |
| field | Yes | Field name | |
| unique | No | Is field unique | |
| options | No | Interface options | |
| required | No | Is field required | |
| interface | No | Field interface | |
| collection | Yes | Collection name | |
| validation | No | Validation rules | |
| default_value | No | Default value |