Edit a diagram
edit_diagramApply a natural-language change to an existing diagram to produce an updated XML version.
Instructions
Apply a natural-language change to an existing diagram (e.g. 'add a Redis cache'). Creates a new version and returns the updated XML. Costs credits. Confirm with the user before calling — it mutates the diagram.
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": {
"diagram_id": "<diagram_id>",
"edit_prompt": "<edit_prompt>"
},
"name": "edit_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diagram_id | Yes | The id returned by generate_diagram / list_diagrams | |
| edit_prompt | Yes | The change to make, in plain language |