create_diagram
Generate a routed, laid-out network diagram from topology text (Graphviz DOT, Mermaid, CSV, CDP/LLDP neighbour output from most switch vendors, a FortiLink topology dump, Containerlab, Meraki or UniFi JSON, or an Ansible inventory — every format is listed in the drawbridge://guide resource) and export it. Drawbridge decides where the lines go; you decide what connects to what. HOW TO GET A PRECISE RESULT: device output the user pasted IS the source — pass it unchanged, never rewritten as DOT. When you write DOT yourself: set kind= on EVERY device so it draws as the real thing rather than a neutral box (firewall, waf, ips, vpn-gateway, proxy, nac, router, switch, l3-switch, load-balancer, wifi-ap, wlc, … — full list in the drawbridge://guide resource). Put speed= on every cable ("10G", "1G"), and link= where the cable MEANS something (ipsec, trunk, lag, wan, mgmt, wireless, conduit, fieldbus, ha). Never set pos=, width= or height=: Drawbridge lays out and routes — placing devices yourself is what makes a diagram look generated. READ THE notes IN THE RESULT AND FIX YOUR SOURCE: they name each line that was skipped or adjusted, and an unrecognised kind silently becomes a plain box otherwise. Iterate until the notes are empty. CHOOSING kind: drawio when the user will open or edit the drawing (this is usually what they want, and it is the only one they can change); svg to embed in a document or a page; png to show inline in a chat; describe.json to READ a drawing back and reason about it; csv / netbox.csv for a cable schedule and netbox-devices.csv for the hardware; dot to hand the topology on; clab.yml to turn the design into a Containerlab topology you can deploy. Results carry name: a suggested basename for this diagram. Write every file for one diagram into its own directory named after it — /.drawio, /.svg, /.cables.csv — so two diagrams never share a directory.
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": {
"source": "<source>"
},
"name": "create_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Output format. Defaults to svg. | |
| name | No | Basename to use for this diagram instead of the one derived from its content. Slugified; wins over the document’s own name. | |
| theme | No | Render theme. Omit to follow the OS appearance; pin it for machine-independent output. | |
| source | Yes | Topology text: Graphviz DOT, Mermaid, CSV, CDP/LLDP neighbour output from most switch vendors, a FortiLink topology dump, Containerlab, Meraki or UniFi JSON, or an Ansible inventory. Device output goes in exactly as the user pasted it — do not rewrite it as DOT. |