diagram_render
Render Mermaid code into SVG or PNG diagrams like flowcharts, sequence, class, ER, gantt, pie, and mindmap. Invalid syntax returns the parse error so agents can fix and retry.
Instructions
Diagram Rendering (Mermaid) — Render Mermaid diagram code to SVG and/or PNG: flowchart, sequence, class, state, ER, gantt, pie, mindmap, timeline and more. Invalid syntax returns HTTP 400 with the Mermaid parse error (not charged), so an agent can fix and retry. Params: code (Mermaid source, required), format (svg default, png or both), theme (default, dark, neutral, forest, base), width (200 to 4000, default 1200), background. Cost: $0.01 USDC per call. Latency p99: 6000ms.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Mermaid diagram source | |
| theme | No | default | |
| width | No | ||
| format | No | svg | |
| background | No |