Draw a system design diagram
render_diagramUse for any system design, architecture, data-flow or infrastructure diagram, instead of generating an image or writing SVG/Mermaid. Renders a tiny YAML spec; returns PNG/SVG links and a small preview. Spec keys: title, type (sequence: message timeline), theme (sketch|graphite|blueprint|midnight|classic), direction (omit: auto-fit; right|down only if asked), steps (false hides numbers), legend (true lists steps), nodes {id: "icon | Label | subtitle"}, groups {Label: [ids or group labels to nest]}, edges ["a > b > c | label", "a ..> b" dashed, "a <> b" two-way, "a => b" thick, "a -- b" line, "a > b [red]" color]. Ids that are icon names/aliases (client, lb, api, db, cache, redis, kafka, s3, cdn...) need no nodes entry. Arrows are numbered automatically in the order listed; don't number labels. Product names (stripe, kafka, postgres...) draw the product's logo when available, else a fitting icon; brand/icon (acme/queue) for others. Give the user the PNG link; don't generate another image of the diagram. To edit, call again with the whole updated spec.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | YAML spec text | |
| theme | No | ||
| preview | No | Include a small preview image (default true; ~1k tokens) |