render_diagram
Convert DGMO markup to SVG or PNG images with theme and palette options. Supports 35+ diagram types for sequence, flowchart, ER, C4, and more.
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. IMPORTANT DGMO syntax rules: (1) Parentheses after a label specify color — "Sales (red)" colors it red, the text becomes just "Sales". Never use parentheses for annotation. Use dashes or separate words instead, e.g. "Diagrammo App - TS" not "Diagrammo App (TS)". (2) All element/label names must be unique — if parentheses are stripped as color, two labels like "App (TS)" and "App (Rust)" both become "App" causing a duplicate name error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dgmo | Yes | DGMO diagram markup. Parentheses in labels = color notation (stripped from display name). All labels must be unique after color stripping. | |
| format | No | Output format | svg |
| theme | No | Color theme | light |
| palette | No | Color palette (nord, solarized, catppuccin, rose-pine, gruvbox, tokyo-night, one-dark, bold) | nord |