update_field
Update a field's behavior or metadata. MUTABLE (change any time): label, description, default_value, required, hidden, min, max, pattern, values. IMMUTABLE: type, unique, search, targets, multiple, valueType, computed, stored, formula. Passing ANY of these — even mixed with mutable ones in the same call — rejects the WHOLE call atomically with NOTHING applied; update_field never silently drops or partially applies an immutable attribute, so only pass attributes you actually intend to change (don't echo back a full field record from list_fields). To actually change one: create a differently-named field with the correct shape and migrate data into it per-tenant via direct REST calls — do NOT delete_field + create_field under the same name, that leaves stale data readable under the old shape. Run the migrate-field prompt for the full step-by-step recipe, or see the aaly://platform/capabilities resource, 'Known footguns'. Note: there is no separate 'facet' attribute at all (create_field has no such param) — faceting is automatic whenever search:true is set on an eligible type, so it follows search's own immutability.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | For text: max char length. For number: max value. For list/multiple: max items. | |
| min | No | For text: min char length. For number: min value. For list/multiple: min items. | |
| label | No | ||
| hidden | No | Excludes the field from GET responses (write-only). Purely a read-time flag. | |
| values | No | For enum fields: replace the list of allowed string values. Removing a value already stored on existing records doesn't corrupt them — it only stops new writes from using it. | |
| pattern | No | For text fields: regex the value must match. Violations return 400 PATTERN_MISMATCH. | |
| field_id | Yes | Field record ID (e.g. 'FLD12') | |
| required | No | Only affects future POSTs; does not re-validate existing records. | |
| description | No | ||
| default_value | No | Match the field's own type — a JSON boolean for type 'boolean', a JSON number for type 'number', a string otherwise. |