fields_update_definition
Replace a complete ACF-compatible definition for a field group, post type, taxonomy, or options page; send the full definition, not a partial merge, to update it.
Instructions
Replace a definition as a whole: omitted keys fall back to the kind's defaults (it is not a merge, so send the full definition from fields_get_definition with your changes). The key always comes from the path; a key in the body is ignored. 404 when it does not exist, 409 cvrt_fields_defined_in_code for a PHP definition, 409 cvrt_fields_json_shadowed when a read-only JSON file still overrides the database copy. Returns the stored 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": {
"site": "<site>",
"kind": "<kind>",
"key": "<key>",
"definition": "<definition>"
},
"name": "fields_update_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Definition key (lowercase letters, digits, underscore), e.g. group_event or event | |
| kind | Yes | Definition kind: field groups, post types, taxonomies or options pages | |
| site | Yes | Site id (see list_sites) | |
| definition | Yes | Definition object in the shape of fields_get_schema for this kind (ACF-compatible) |