generate_plantuml_diagram
Generate a PlantUML diagram with automatic syntax validation and error reporting for auto-fix workflows. Returns embeddable image URLs for valid diagrams or structured error details for invalid syntax that can be automatically corrected. Optionally saves the diagram to a local file.
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": {
"plantuml_code": "<plantuml_code>"
},
"name": "generate_plantuml_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output image format (SVG or PNG) | svg |
| output_path | No | Optional. Path to save diagram locally. Automatically creates all necessary parent directories. Restricted to current working directory by default. Set PLANTUML_ALLOWED_DIRS env var (colon-separated paths, or "*" for unrestricted) to allow additional directories. Only .svg and .png extensions permitted. | |
| plantuml_code | Yes | PlantUML diagram code. Will be automatically validated for syntax errors before generating the diagram URL. |