generate_diagram
Generate infrastructure diagrams by writing Python code with the diagrams package DSL. Supports Azure components and custom architectures.
Instructions
Generate a diagram from Python code using the diagrams package DSL.
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": "generate_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python code using the diagrams package DSL to generate a diagram. Must contain a Diagram() call. | |
| filename | No | Optional output filename for the generated diagram (without extension). | |
| timeout | No | Timeout in seconds for diagram generation (1-300). | |
| workspace_dir | No | Optional workspace directory for output files. |