render_diagram
Renders DGMO markup to SVG or PNG and returns SVG text or a base64 PNG, including a saved temp file path when PNG is selected.
Instructions
Render DGMO markup to SVG or PNG. Returns SVG text or base64 PNG image. When format is "png", also saves the image to a temp file and returns the path. For DGMO syntax call get_language_reference.
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": {
"dgmo": "<dgmo>"
},
"name": "render_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dgmo | Yes | DGMO diagram markup. For syntax call get_language_reference. | |
| theme | No | Color theme | light |
| width | No | Canvas width in px. Omit to let the diagram size itself from its content. Honoured exactly by the chart types that lay their content out into the canvas (bar, line, pie and the other data charts). A chart that sizes itself from its own nodes — org, sitemap, class, er, infra and the rest of the structured family — cannot go below its content and will return a wider canvas than asked for. | |
| format | No | Output format | svg |
| height | No | Canvas height in px. Most chart types derive height from their content and ignore this; the data charts honour it. | |
| palette | No | Color palette (slate, atlas, blueprint, tidewater, nord, catppuccin, tokyo-night). Given, it beats the diagram's own palette line; omitted, the diagram's own palette is used, else slate. | |
| highlight | No | Story view for this render only: the element names to emphasise. Given, it replaces the diagram's own highlight line; 'none' clears it. Omitted, the diagram's own line is used. Which elements a name matches: get_language_reference. |