Generate a draw.io diagram
generate_diagramGenerates draw.io diagrams from plain language descriptions. Returns complete mxfile XML ready to save or paste, and can update existing diagrams by providing previous XML.
Instructions
Generate a draw.io (diagrams.net) diagram from a natural-language description. Returns complete mxfile XML you can save as a .drawio file or paste into diagrams.net. Pass previousXml to modify an existing 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": {
"prompt": "<prompt>"
},
"name": "generate_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Quality/speed tier. Default flash. | |
| prompt | Yes | What to draw, in plain language. | |
| previousXml | No | Existing mxfile XML to modify (full updated document is returned). |