raw_xml_replace
Replace a single XML element in a .rdl file by XPath, with safety checks for zero or multiple matches and no root element replacement. Saves changes atomically.
Instructions
Replace the single element matched by xpath with new content. content is parsed with RDL as the default namespace and 'rd:' bound, so bare names like x work without explicit xmlns. Refuses on zero matches, multiple matches, or if the xpath targets the root. Saves atomically. Returns {xpath, kind, changed}.
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": {
"path": "<path>",
"xpath": "<xpath>",
"content": "<content>"
},
"name": "raw_xml_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| xpath | Yes | ||
| content | Yes | XML for the replacement element. Exactly one top-level element. |