workspaces_context_fields_create
Adds a key to the workspace's lead context schema. Declare every field an enrichment writes or a filter or template reads before you create them, or the enrichment has nowhere to store its output. key must be unique in the workspace; field_type sets how the value is stored and filtered; use=true includes the value in the context the AI sees when it writes messages.
Method: POST /api/v1/workspaces/{workspace_sqid}/context-fields/
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": "workspaces_context_fields_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| use | No | Use for message generation. | |
| keys | No | Comma-separated list of alternative keys for this field | |
| order | No | ||
| field_type | No | * `string` - String * `text` - Text * `number` - Number * `boolean` - Boolean * `date` - Date * `url` - URL * `phone_number` - Phone Number * `email` - Email * `choice` - Choice | |
| description | No | Explain to AI what this field is about |