modx_update_element
Replaces a MODX element’s complete content in one update. Use it for small elements or full rewrites; for minor changes in large elements, use line-based editing instead.
Instructions
Update a MODX element by REPLACING its whole content (send the complete new content). Best for small elements or full rewrites. For a few changes inside a large chunk/snippet/template/plugin, do NOT use this — use modx_view_element + modx_edit_element_lines instead (sends only the changed lines, far fewer tokens, atomic with a safety anchor).
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": {
"type": "<type>"
},
"name": "modx_update_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| new | No | ||
| name | No | ||
| size | No | ||
| tags | No | ||
| type | Yes | ||
| alias | No | ||
| color | No | ||
| price | No | ||
| events | No | ||
| parent | No | ||
| vendor | No | ||
| weight | No | ||
| article | No | ||
| caption | No | ||
| content | No | ||
| made_in | No | ||
| popular | No | ||
| remains | No | ||
| category | No | ||
| favorite | No | ||
| hidemenu | No | ||
| isfolder | No | ||
| template | No | ||
| class_key | No | ||
| introtext | No | ||
| menutitle | No | ||
| old_price | No | ||
| published | No | ||
| templates | No | ||
| field_type | No | ||
| context_key | No | ||
| media_source | No | ||
| input_properties | No | ||
| _runtime_preconditions | No | Internal Site Agent Runtime CAS preconditions. Not intended for manual model-authored calls. |