draw_architecture
Draw an architecture or flow diagram in the chat. YOU write the diagram as Mermaid flowchart text (first line "flowchart LR" or "graph TD"; nodes like A[Web app], B[(Database)], edges like A -->|request| B). This tool lays it out and returns a finished diagram that the view draws inline (MCP Apps hosts; elsewhere the text fallback lists the nodes and edges). Call it with the Mermaid you wrote and show the result as it is: do not edit, re-encode or re-send the returned block, and do not pass it to render_surface. If it is refused, the message says what to fix; correct the Mermaid and call again. Limits: 8192 bytes of Mermaid, at most 12 nodes, 16 edges and 4 subgraphs; larger systems should be split into several diagrams (one per subsystem). Only flowcharts are supported (no sequence, class, state or ER diagrams); colours, styles and click links are not drawn; labels are plain text up to 40 characters, with no HTML or links.
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": {
"mermaid": "<mermaid>"
},
"name": "draw_architecture"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional title shown above the diagram (plain text, 80 characters at most). | |
| mermaid | Yes | Mermaid flowchart text you wrote, for example: flowchart LR\n U[Shopper] --> G[API gateway]\n G --> O[Order service]\n O --> D[(Postgres)] |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Diagram title. | |
| blocks | Yes | One laid-out architecture block for the view. |