diagram_studio
Draw a diagram in-chat with the full Diagram Studio interface (MCP Apps hosts only; it opens fullscreen where the host allows it). YOU write the diagram; nothing is generated server-side and nothing is stored. PREFER graph: give vertices (id, label, type start|process|decision|database|cloud|end) and edges (source, target, optional label). The person then gets the whole studio: they can switch the same graph between Mermaid, D2, PlantUML and draw.io, flip its direction, zoom, copy the code, open it in the real draw.io editor with one click, and edit nodes and connections themselves (their edits come back to you). Use syntax with source instead only for diagrams a flow graph cannot express, drawn exactly as written: "mermaid" for sequence, class, state, ER, gantt and mind maps; "d2" for architecture diagrams with containers and nested boxes. Give exactly one of graph or syntax with source. Keep diagrams compact (the input schema states the limits). If the tool or the view reports a problem, fix it and call this tool again. On a host without MCP Apps support the diagram comes back as text.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "diagram_studio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| graph | No | The diagram as a graph (preferred). | |
| theme | No | Colours for the draw.io output. Default modern_indigo. | |
| title | No | Optional heading shown above the diagram. | |
| format | No | Which format the view opens on. Default mermaid; mermaid and d2 draw a picture. | |
| source | No | Only with `syntax`: a complete diagram, drawn as written. | |
| syntax | No | Only with `source`: the language of that source. | |
| direction | No | Graph layout direction: TB (top to bottom, default) or LR. |