generate_uml
Generate UML, Mermaid, D2, and other diagrams from diagram type and code, returning rendered SVG, PNG, PDF, JPEG, or base64 for AI assistants via MCP.
Instructions
Generate any UML or diagram by type (class, sequence, mermaid, d2, etc.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Diagram code in the syntax for the chosen type | |
| scale | No | Scale factor for SVG only (default 1.0, min 0.1). Ignored for other formats. | |
| theme | No | PlantUML theme for UML diagrams (e.g. cerulean) | |
| output_dir | No | Directory to save the image. Omit or None for URL, playground, and content_base64 only (no file write; use in serverless / read-only). | |
| diagram_type | Yes | Type of diagram (class, sequence, activity, mermaid, d2, etc.) | |
| output_format | No | svg, png, pdf, jpeg, txt, or base64 (default: svg). See uml://formats per type. | svg |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||