diagram_replace
Replace the whole diagram with Mermaid or draw.io XML, loading it into the live canvas and applying draw.io layout. Avoid tedious geometry edits by swapping entire structures at once.
Instructions
Replace the whole diagram with Mermaid or draw.io XML. Loads into the live canvas and lets draw.io layout. Prefer this over many tiny geometry edits.
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": {
"content": "<content>"
},
"name": "diagram_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | ||
| layout | No | draw.io layout preset. Defaults to verticalFlow for Mermaid, none for XML. | |
| content | Yes | Mermaid source or draw.io / mxfile XML |