D2¶
D2 is a declarative diagram language with first-class layout engines. UML-MCP renders D2 through Kroki using the same generate_uml tool as other types; set diagram_type to d2 and pass D2 source in code.
Example (source)¶
Example (rendered SVG)¶
The SVG below was produced with generate_uml (diagram_type: d2, output_format: svg) against the snippet above, then committed under docs/assets/diagrams/.
Parameters¶
| Property | Value |
|---|---|
diagram_type | d2 |
| Backend | D2 (via Kroki) |
| Output formats | svg |
See also¶
- Graphviz for DOT graphs
- More diagram backends (hub: ERD, DBML, BlockDiag, BPMN, C4, Structurizr, specialty)
- Diagram catalog for the full
diagram_typelist