Render PlantUML diagram
render_diagramRender PlantUML code into PNG, SVG, or ASCII art; returns PNG inline for inspection, SVG/TXT as text, optionally saves to a file, and reports syntax errors with the offending line.
Instructions
Renders PlantUML code (class, sequence, use case, activity, component, state, deployment, ER, mindmap, gantt...) into an image. PNG is returned inline so it can be inspected; SVG/TXT are returned as text. Optionally saves the result to output_path. Reports syntax errors with the offending line.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | PlantUML source. @startuml/@enduml is added automatically if missing. | |
| format | No | Output format (txt = ASCII art) | png |
| output_path | No | File path to save the rendered diagram to |