Generate a diagram
generate_diagramGenerate shareable architecture diagrams from natural language or source code (Terraform, docker-compose, Kubernetes, SQL, Mermaid, PlantUML) and receive a diagram ID for later edits.
Instructions
Generate a draw.io-style diagram with draft1.ai from a natural-language description or from source code (Terraform, docker-compose, Kubernetes, SQL, Mermaid, PlantUML). Returns a shareable URL plus a diagram_id for follow-up edits.
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": {
"prompt": "<prompt>"
},
"name": "generate_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Type of the input. Defaults to "auto" (the API detects the input type). | |
| prompt | Yes | What to diagram: a plain-English description (e.g. 'a web app with a load balancer, two app servers and a postgres db') or raw source code pasted verbatim. |