validate
CHECK TOPOLOGY TEXT BEFORE DRAWING IT: reads the same source create_diagram would and reports what it found — the format it detected, how many devices and links it would draw, and every line it would skip or adjust, with the line number and the reason. An unknown kind= names the nearest real one. Nothing is laid out, routed or rendered, so it is far cheaper than a draw: call it, fix what it names, then call create_diagram once. 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": "validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. |