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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "render_diagram"
}
}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 |