UML & Diagram Generation via Kroki
MCP Server
| Property |
Value |
| Source |
antoinebou12/uml-mcp |
| Transport |
stdio (default) or HTTP |
| Tools |
2 (generate_uml, generate_diagram_url) |
| Resources |
8 (diagram types, templates, examples, formats, server info) |
| Prompts |
11 (class, sequence, activity, usecase, Mermaid, BPMN, etc.) |
| Rendering |
Kroki (primary) with PlantUML and Mermaid.ink fallback |
Tools
generate_uml
Generate a diagram and optionally save to disk.
| Parameter |
Type |
Default |
Description |
diagram_type |
string |
required |
Diagram type (class, sequence, mermaid, d2, graphviz, etc.) |
code |
string |
required |
Diagram source code |
output_dir |
string |
null |
Directory to save file (null = no file write) |
output_format |
string |
"svg" |
Output format: svg, png, pdf, jpeg, txt, base64 |
theme |
string |
null |
PlantUML theme directive |
scale |
float |
1.0 |
SVG scaling factor (min 0.1) |
Returns: { code, url, playground, local_path, content_base64, error }
generate_diagram_url
Get the Kroki rendering URL and optional base64 content without saving to disk.
| Parameter |
Type |
Default |
Description |
diagram_type |
string |
required |
Diagram type |
code |
string |
required |
Diagram source code |
output_format |
string |
"svg" |
Output format |
theme |
string |
null |
PlantUML theme |
scale |
float |
1.0 |
SVG scaling factor |
Returns: { code, url, playground, content_base64, error }
Supported Diagram Types (27+)
PlantUML-based
| Type |
Description |
Use Case |
class |
Class diagrams |
Object relationships, inheritance, interfaces |
sequence |
Sequence diagrams |
Message flows between components |
activity |
Activity diagrams |
Workflow and process flows |
usecase |
Use case diagrams |
Actor-system interactions |
state |
State machine diagrams |
FSM, protocol states |
component |
Component diagrams |
System architecture |
deployment |
Deployment diagrams |
Infrastructure layout |
object |
Object diagrams |
Instance-level relationships |
c4plantuml |
C4 architecture |
System context, container, component views |
plantuml |
Generic PlantUML |
Any PlantUML syntax |
Network & Infrastructure
| Type |
Description |
Use Case |
nwdiag |
Network diagrams |
Network topology, IP addressing, VLANs |
rackdiag |
Rack diagrams |
Data center rack layouts |
packetdiag |
Packet diagrams |
Protocol header formats (Ethernet, IP, TCP) |
blockdiag |
Block diagrams |
System block diagrams |
actdiag |
Activity diagrams |
Activity flow (blockdiag family) |
seqdiag |
Sequence diagrams |
Sequence flow (blockdiag family) |
Other Backends
| Type |
Description |
Use Case |
mermaid |
Mermaid diagrams |
Flowcharts, Gantt, sequence, pie, journey |
d2 |
D2 declarative |
Modern declarative diagrams |
graphviz |
Graphviz DOT |
Graph layouts, dependency trees |
erd |
Entity-Relationship |
Database schema diagrams |
dbml |
Database Markup |
Database schema (DBML syntax) |
bpmn |
BPMN 2.0 |
Business process modeling |
structurizr |
Structurizr DSL |
C4 model architecture |
ditaa |
ASCII art to diagram |
Convert ASCII art to polished diagrams |
wavedrom |
Digital timing |
Protocol timing diagrams, signal waveforms |
wireviz |
Wire/cable harness |
Cable and connector documentation |
bytefield |
Byte field |
Binary format documentation |
Network Engineering Examples
Network Topology (nwdiag)
generate_uml(
diagram_type="nwdiag",
code="""
nwdiag {
network dmz {
address = "210.x.x.x/24"
web01 [address = "210.x.x.1"];
web02 [address = "210.x.x.2"];
}
network internal {
address = "172.x.x.x/24"
web01 [address = "172.x.x.1"];
web02 [address = "172.x.x.2"];
db01;
}
}
""",
output_format="svg"
)
Rack Diagram (rackdiag)
generate_uml(
diagram_type="rackdiag",
code="""
rackdiag {
16U;
1: UPS;
2: UPS;
3: Patch Panel;
4: Catalyst 9300;
5: Catalyst 9300;
6: Nexus 9000;
7: Nexus 9000;
8: ASR 1001-X;
9: ASR 1001-X;
10: BIG-IP i5800;
11: BIG-IP i5800;
12: UCS C220;
13: UCS C220;
14: UCS C220;
15: UCS C220;
16: Cable Management;
}
""",
output_format="png"
)
Packet Header (packetdiag)
generate_uml(
diagram_type="packetdiag",
code="""
packetdiag {
colwidth = 32
node_height = 72
0-3: Version
4-7: IHL
8-15: DSCP / ECN
16-31: Total Length
32-47: Identification
48-50: Flags
51-63: Fragment Offset
64-71: TTL
72-79: Protocol
80-95: Header Checksum
96-127: Source Address
128-159: Destination Address
}
""",
output_format="svg"
)
BGP State Machine (state)
generate_uml(
diagram_type="state",
code="""
@startuml
[*] --> Idle
Idle --> Connect : Start
Connect --> OpenSent : TCP established
Connect --> Active : TCP failed
Active --> OpenSent : TCP established
Active --> Connect : ConnectRetry timer
OpenSent --> OpenConfirm : OPEN received (valid)
OpenSent --> Idle : OPEN received (error)
OpenConfirm --> Established : KEEPALIVE received
OpenConfirm --> Idle : Hold timer expired
Established --> Idle : NOTIFICATION / Hold expired
Established : Process UPDATE messages
@enduml
""",
output_format="svg"
)
OSPF Area Design (class)
generate_uml(
diagram_type="class",
code="""
@startuml
package "Area 0 - Backbone" {
class "Core-1" as C1 { router-id: 1.1.1.1 }
class "Core-2" as C2 { router-id: 2.2.2.2 }
C1 -- C2 : 10G P2P
}
package "Area 1 - Campus" {
class "Dist-1" as D1 { router-id: 3.3.3.3 }
class "Dist-2" as D2 { router-id: 4.4.4.4 }
}
package "Area 2 - DC" {
class "Spine-1" as S1 { router-id: 5.5.5.5 }
class "Spine-2" as S2 { router-id: 6.6.6.6 }
}
C1 -- D1 : ABR
C2 -- D2 : ABR
C1 -- S1 : ABR
C2 -- S2 : ABR
@enduml
""",
output_format="svg"
)
Sequence: Change Request Flow
generate_uml(
diagram_type="sequence",
code="""
@startuml
actor Engineer
participant NetClaw
participant ServiceNow
participant Device
participant GAIT
Engineer -> NetClaw : "Add Loopback99"
NetClaw -> ServiceNow : Create Change Request
ServiceNow --> NetClaw : CR-12345 (New)
NetClaw -> ServiceNow : Wait for approval
ServiceNow --> NetClaw : CR-12345 (Implement)
NetClaw -> Device : Capture baseline
Device --> NetClaw : Running config
NetClaw -> Device : Apply config
Device --> NetClaw : Config applied
NetClaw -> Device : Verify change
Device --> NetClaw : Loopback99 up/up
NetClaw -> ServiceNow : Close CR-12345
NetClaw -> GAIT : Record full audit trail
NetClaw --> Engineer : Done. Verified.
@enduml
""",
output_format="svg"
)
C4 Architecture (structurizr)
generate_uml(
diagram_type="structurizr",
code="""
workspace {
model {
engineer = person "Network Engineer"
netclaw = softwareSystem "NetClaw" {
openclaw = container "OpenClaw Agent"
pyats = container "pyATS MCP"
gait = container "GAIT MCP"
}
network = softwareSystem "Network Devices"
servicenow = softwareSystem "ServiceNow"
engineer -> openclaw "Chat"
openclaw -> pyats "MCP (stdio)"
openclaw -> gait "MCP (stdio)"
pyats -> network "SSH/NETCONF"
openclaw -> servicenow "REST API"
}
views {
container netclaw {
include *
autoLayout
}
}
}
""",
output_format="svg"
)
Workflows
1. Network Topology Documentation
pyats-topology → CDP/LLDP discovery data
→ generate_uml(type="nwdiag") → network topology diagram
→ msgraph-files → upload to SharePoint
→ GAIT
2. Protocol State Machine Reference
generate_uml(type="state") → BGP/OSPF/STP state machine
→ Share in Slack/Teams for team reference
→ GAIT
3. Change Request Visualization
servicenow-change-workflow → CR details
→ generate_uml(type="sequence") → change flow diagram
→ Attach to ServiceNow CR or GAIT log
→ GAIT
4. Data Center Rack Documentation
generate_uml(type="rackdiag") → rack layout
→ generate_uml(type="nwdiag") → network connections
→ Cross-reference with NetBox rack/device data
→ msgraph-files → upload to SharePoint
→ GAIT
5. Packet Format Reference
generate_uml(type="packetdiag") → protocol header diagram
→ rfc-lookup → verify against RFC
→ Share as reference material
→ GAIT
6. Architecture Documentation
generate_uml(type="structurizr" or "c4plantuml") → C4 architecture views
→ generate_uml(type="deployment") → deployment diagram
→ generate_uml(type="component") → component breakdown
→ msgraph-files → upload to SharePoint
→ GAIT
Integration with Other Skills
| Skill |
Integration |
| pyats-topology |
Feed CDP/LLDP discovery data into nwdiag for topology diagrams |
| drawio-diagram |
UML MCP for standards-based UML; Draw.io for freeform network diagrams |
| markmap-viz |
Markmap for hierarchical mind maps; UML for structured diagrams |
| netbox-reconcile |
Generate nwdiag diagrams color-coded by reconciliation status |
| rfc-lookup |
Pair packetdiag with RFC references for protocol documentation |
| servicenow-change-workflow |
Sequence diagrams documenting change request flows |
| msgraph-files |
Upload generated diagrams to SharePoint |
| msgraph-teams |
Share diagram URLs in Teams channels |
| gait-session-tracking |
Record all diagram generation in GAIT |
Comparison: UML MCP vs Draw.io vs Markmap
| Feature |
UML MCP |
Draw.io |
Markmap |
| Best for |
Structured UML, protocol diagrams, architecture |
Freeform network topology |
Hierarchical mind maps |
| Diagram types |
27+ (class, sequence, nwdiag, rack, packet, etc.) |
Network topology, flowcharts |
Mind maps from markdown |
| Rendering |
Kroki (server-side) |
Browser or CLI |
Browser |
| Output |
SVG, PNG, PDF, JPEG |
.drawio, PNG, SVG, PDF |
HTML |
| Code-based |
Yes (PlantUML, Mermaid, D2, DOT, etc.) |
XML/Mermaid/CSV |
Markdown |
| Network-specific |
nwdiag, rackdiag, packetdiag |
Full topology editor |
OSPF/BGP hierarchies |
When to use UML MCP:
- Protocol state machines (BGP FSM, OSPF states, STP states)
- Network topology diagrams from code (nwdiag)
- Rack layouts (rackdiag)
- Packet header documentation (packetdiag)
- Sequence diagrams (change workflows, protocol exchanges)
- Architecture documentation (C4, component, deployment)
- Database schema diagrams (ERD, DBML)
- Any diagram type supported by Kroki
When to use Draw.io:
- Interactive topology editing
- Native .drawio files for team collaboration
- Color-coded reconciliation status overlays
When to use Markmap:
- Hierarchical data (OSPF areas, BGP peers, config structure)
- Quick visual summaries from markdown
Guardrails
- All operations are read-only — generates diagrams, never modifies network state
- Public Kroki by default — diagram source code is sent to kroki.io for rendering; use a local Kroki instance (
KROKI_SERVER) for sensitive topology data
- No secrets in diagrams — never include IP credentials, passwords, or SNMP communities in diagram source code
- Record in GAIT — every diagram generation must be logged
1---2name: uml-diagram3description: UML and diagram generation via Kroki — class, sequence, activity, state, component, deployment, network, ER, C4, Mermaid, D2, Graphviz, BPMN, 27+ types. Use when generating a network diagram, creating a sequence diagram, drawing a rack layout, visualizing a protocol state machine, or producing architecture documentation.4license: Apache-2.05---6
7# UML & Diagram Generation via Kroki
8
9## MCP Server
10
11| Property | Value |
12|----------|-------|
13| **Source** | [antoinebou12/uml-mcp](https://github.com/antoinebou12/uml-mcp) |
14| **Transport** | stdio (default) or HTTP |
15| **Tools** | 2 (`generate_uml`, `generate_diagram_url`) |
16| **Resources** | 8 (diagram types, templates, examples, formats, server info) |
17| **Prompts** | 11 (class, sequence, activity, usecase, Mermaid, BPMN, etc.) |
18| **Rendering** | Kroki (primary) with PlantUML and Mermaid.ink fallback |
19
20## Tools
21
22### `generate_uml`
23
24Generate a diagram and optionally save to disk.
25
26| Parameter | Type | Default | Description |
27|-----------|------|---------|-------------|
28| `diagram_type` | string | required | Diagram type (class, sequence, mermaid, d2, graphviz, etc.) |
29| `code` | string | required | Diagram source code |
30| `output_dir` | string | null | Directory to save file (null = no file write) |
31| `output_format` | string | "svg" | Output format: svg, png, pdf, jpeg, txt, base64 |
32| `theme` | string | null | PlantUML theme directive |
33| `scale` | float | 1.0 | SVG scaling factor (min 0.1) |
34
35**Returns:** `{ code, url, playground, local_path, content_base64, error }`
36
37### `generate_diagram_url`
38
39Get the Kroki rendering URL and optional base64 content without saving to disk.
40
41| Parameter | Type | Default | Description |
42|-----------|------|---------|-------------|
43| `diagram_type` | string | required | Diagram type |
44| `code` | string | required | Diagram source code |
45| `output_format` | string | "svg" | Output format |
46| `theme` | string | null | PlantUML theme |
47| `scale` | float | 1.0 | SVG scaling factor |
48
49**Returns:** `{ code, url, playground, content_base64, error }`
50
51---
52
53## Supported Diagram Types (27+)
54
55### PlantUML-based
56
57| Type | Description | Use Case |
58|------|-------------|----------|
59| `class` | Class diagrams | Object relationships, inheritance, interfaces |
60| `sequence` | Sequence diagrams | Message flows between components |
61| `activity` | Activity diagrams | Workflow and process flows |
62| `usecase` | Use case diagrams | Actor-system interactions |
63| `state` | State machine diagrams | FSM, protocol states |
64| `component` | Component diagrams | System architecture |
65| `deployment` | Deployment diagrams | Infrastructure layout |
66| `object` | Object diagrams | Instance-level relationships |
67| `c4plantuml` | C4 architecture | System context, container, component views |
68| `plantuml` | Generic PlantUML | Any PlantUML syntax |
69
70### Network & Infrastructure
71
72| Type | Description | Use Case |
73|------|-------------|----------|
74| `nwdiag` | Network diagrams | Network topology, IP addressing, VLANs |
75| `rackdiag` | Rack diagrams | Data center rack layouts |
76| `packetdiag` | Packet diagrams | Protocol header formats (Ethernet, IP, TCP) |
77| `blockdiag` | Block diagrams | System block diagrams |
78| `actdiag` | Activity diagrams | Activity flow (blockdiag family) |
79| `seqdiag` | Sequence diagrams | Sequence flow (blockdiag family) |
80
81### Other Backends
82
83| Type | Description | Use Case |
84|------|-------------|----------|
85| `mermaid` | Mermaid diagrams | Flowcharts, Gantt, sequence, pie, journey |
86| `d2` | D2 declarative | Modern declarative diagrams |
87| `graphviz` | Graphviz DOT | Graph layouts, dependency trees |
88| `erd` | Entity-Relationship | Database schema diagrams |
89| `dbml` | Database Markup | Database schema (DBML syntax) |
90| `bpmn` | BPMN 2.0 | Business process modeling |
91| `structurizr` | Structurizr DSL | C4 model architecture |
92| `ditaa` | ASCII art to diagram | Convert ASCII art to polished diagrams |
93| `wavedrom` | Digital timing | Protocol timing diagrams, signal waveforms |
94| `wireviz` | Wire/cable harness | Cable and connector documentation |
95| `bytefield` | Byte field | Binary format documentation |
96
97---
98
99## Network Engineering Examples
100
101### Network Topology (nwdiag)
102
103```
104generate_uml(
105 diagram_type="nwdiag",
106 code="""
107nwdiag {
108 network dmz {
109 address = "210.x.x.x/24"
110 web01 [address = "210.x.x.1"];
111 web02 [address = "210.x.x.2"];
112 }
113 network internal {
114 address = "172.x.x.x/24"
115 web01 [address = "172.x.x.1"];
116 web02 [address = "172.x.x.2"];
117 db01;
118 }
119}
120""",
121 output_format="svg"
122)
123```
124
125### Rack Diagram (rackdiag)
126
127```
128generate_uml(
129 diagram_type="rackdiag",
130 code="""
131rackdiag {
132 16U;
133 1: UPS;
134 2: UPS;
135 3: Patch Panel;
136 4: Catalyst 9300;
137 5: Catalyst 9300;
138 6: Nexus 9000;
139 7: Nexus 9000;
140 8: ASR 1001-X;
141 9: ASR 1001-X;
142 10: BIG-IP i5800;
143 11: BIG-IP i5800;
144 12: UCS C220;
145 13: UCS C220;
146 14: UCS C220;
147 15: UCS C220;
148 16: Cable Management;
149}
150""",
151 output_format="png"
152)
153```
154
155### Packet Header (packetdiag)
156
157```
158generate_uml(
159 diagram_type="packetdiag",
160 code="""
161packetdiag {
162 colwidth = 32
163 node_height = 72
164 0-3: Version
165 4-7: IHL
166 8-15: DSCP / ECN
167 16-31: Total Length
168 32-47: Identification
169 48-50: Flags
170 51-63: Fragment Offset
171 64-71: TTL
172 72-79: Protocol
173 80-95: Header Checksum
174 96-127: Source Address
175 128-159: Destination Address
176}
177""",
178 output_format="svg"
179)
180```
181
182### BGP State Machine (state)
183
184```
185generate_uml(
186 diagram_type="state",
187 code="""
188@startuml
189[*] --> Idle
190Idle --> Connect : Start
191Connect --> OpenSent : TCP established
192Connect --> Active : TCP failed
193Active --> OpenSent : TCP established
194Active --> Connect : ConnectRetry timer
195OpenSent --> OpenConfirm : OPEN received (valid)
196OpenSent --> Idle : OPEN received (error)
197OpenConfirm --> Established : KEEPALIVE received
198OpenConfirm --> Idle : Hold timer expired
199Established --> Idle : NOTIFICATION / Hold expired
200Established : Process UPDATE messages
201@enduml
202""",
203 output_format="svg"
204)
205```
206
207### OSPF Area Design (class)
208
209```
210generate_uml(
211 diagram_type="class",
212 code="""
213@startuml
214package "Area 0 - Backbone" {
215 class "Core-1" as C1 { router-id: 1.1.1.1 }
216 class "Core-2" as C2 { router-id: 2.2.2.2 }
217 C1 -- C2 : 10G P2P
218}
219package "Area 1 - Campus" {
220 class "Dist-1" as D1 { router-id: 3.3.3.3 }
221 class "Dist-2" as D2 { router-id: 4.4.4.4 }
222}
223package "Area 2 - DC" {
224 class "Spine-1" as S1 { router-id: 5.5.5.5 }
225 class "Spine-2" as S2 { router-id: 6.6.6.6 }
226}
227C1 -- D1 : ABR
228C2 -- D2 : ABR
229C1 -- S1 : ABR
230C2 -- S2 : ABR
231@enduml
232""",
233 output_format="svg"
234)
235```
236
237### Sequence: Change Request Flow
238
239```
240generate_uml(
241 diagram_type="sequence",
242 code="""
243@startuml
244actor Engineer
245participant NetClaw
246participant ServiceNow
247participant Device
248participant GAIT
249
250Engineer -> NetClaw : "Add Loopback99"
251NetClaw -> ServiceNow : Create Change Request
252ServiceNow --> NetClaw : CR-12345 (New)
253NetClaw -> ServiceNow : Wait for approval
254ServiceNow --> NetClaw : CR-12345 (Implement)
255NetClaw -> Device : Capture baseline
256Device --> NetClaw : Running config
257NetClaw -> Device : Apply config
258Device --> NetClaw : Config applied
259NetClaw -> Device : Verify change
260Device --> NetClaw : Loopback99 up/up
261NetClaw -> ServiceNow : Close CR-12345
262NetClaw -> GAIT : Record full audit trail
263NetClaw --> Engineer : Done. Verified.
264@enduml
265""",
266 output_format="svg"
267)
268```
269
270### C4 Architecture (structurizr)
271
272```
273generate_uml(
274 diagram_type="structurizr",
275 code="""
276workspace {
277 model {
278 engineer = person "Network Engineer"
279 netclaw = softwareSystem "NetClaw" {
280 openclaw = container "OpenClaw Agent"
281 pyats = container "pyATS MCP"
282 gait = container "GAIT MCP"
283 }
284 network = softwareSystem "Network Devices"
285 servicenow = softwareSystem "ServiceNow"
286
287 engineer -> openclaw "Chat"
288 openclaw -> pyats "MCP (stdio)"
289 openclaw -> gait "MCP (stdio)"
290 pyats -> network "SSH/NETCONF"
291 openclaw -> servicenow "REST API"
292 }
293 views {
294 container netclaw {
295 include *
296 autoLayout
297 }
298 }
299}
300""",
301 output_format="svg"
302)
303```
304
305---
306
307## Workflows
308
309### 1. Network Topology Documentation
310```
311pyats-topology → CDP/LLDP discovery data
312→ generate_uml(type="nwdiag") → network topology diagram
313→ msgraph-files → upload to SharePoint
314→ GAIT
315```
316
317### 2. Protocol State Machine Reference
318```
319generate_uml(type="state") → BGP/OSPF/STP state machine
320→ Share in Slack/Teams for team reference
321→ GAIT
322```
323
324### 3. Change Request Visualization
325```
326servicenow-change-workflow → CR details
327→ generate_uml(type="sequence") → change flow diagram
328→ Attach to ServiceNow CR or GAIT log
329→ GAIT
330```
331
332### 4. Data Center Rack Documentation
333```
334generate_uml(type="rackdiag") → rack layout
335→ generate_uml(type="nwdiag") → network connections
336→ Cross-reference with NetBox rack/device data
337→ msgraph-files → upload to SharePoint
338→ GAIT
339```
340
341### 5. Packet Format Reference
342```
343generate_uml(type="packetdiag") → protocol header diagram
344→ rfc-lookup → verify against RFC
345→ Share as reference material
346→ GAIT
347```
348
349### 6. Architecture Documentation
350```
351generate_uml(type="structurizr" or "c4plantuml") → C4 architecture views
352→ generate_uml(type="deployment") → deployment diagram
353→ generate_uml(type="component") → component breakdown
354→ msgraph-files → upload to SharePoint
355→ GAIT
356```
357
358---
359
360## Integration with Other Skills
361
362| Skill | Integration |
363|-------|-------------|
364| **pyats-topology** | Feed CDP/LLDP discovery data into nwdiag for topology diagrams |
365| **drawio-diagram** | UML MCP for standards-based UML; Draw.io for freeform network diagrams |
366| **markmap-viz** | Markmap for hierarchical mind maps; UML for structured diagrams |
367| **netbox-reconcile** | Generate nwdiag diagrams color-coded by reconciliation status |
368| **rfc-lookup** | Pair packetdiag with RFC references for protocol documentation |
369| **servicenow-change-workflow** | Sequence diagrams documenting change request flows |
370| **msgraph-files** | Upload generated diagrams to SharePoint |
371| **msgraph-teams** | Share diagram URLs in Teams channels |
372| **gait-session-tracking** | Record all diagram generation in GAIT |
373
374---
375
376## Comparison: UML MCP vs Draw.io vs Markmap
377
378| Feature | UML MCP | Draw.io | Markmap |
379|---------|---------|---------|---------|
380| **Best for** | Structured UML, protocol diagrams, architecture | Freeform network topology | Hierarchical mind maps |
381| **Diagram types** | 27+ (class, sequence, nwdiag, rack, packet, etc.) | Network topology, flowcharts | Mind maps from markdown |
382| **Rendering** | Kroki (server-side) | Browser or CLI | Browser |
383| **Output** | SVG, PNG, PDF, JPEG | .drawio, PNG, SVG, PDF | HTML |
384| **Code-based** | Yes (PlantUML, Mermaid, D2, DOT, etc.) | XML/Mermaid/CSV | Markdown |
385| **Network-specific** | nwdiag, rackdiag, packetdiag | Full topology editor | OSPF/BGP hierarchies |
386
387**When to use UML MCP:**
388- Protocol state machines (BGP FSM, OSPF states, STP states)
389- Network topology diagrams from code (nwdiag)
390- Rack layouts (rackdiag)
391- Packet header documentation (packetdiag)
392- Sequence diagrams (change workflows, protocol exchanges)
393- Architecture documentation (C4, component, deployment)
394- Database schema diagrams (ERD, DBML)
395- Any diagram type supported by Kroki
396
397**When to use Draw.io:**
398- Interactive topology editing
399- Native .drawio files for team collaboration
400- Color-coded reconciliation status overlays
401
402**When to use Markmap:**
403- Hierarchical data (OSPF areas, BGP peers, config structure)
404- Quick visual summaries from markdown
405
406---
407
408## Guardrails
409
410- **All operations are read-only** — generates diagrams, never modifies network state
411- **Public Kroki by default** — diagram source code is sent to kroki.io for rendering; use a local Kroki instance (`KROKI_SERVER`) for sensitive topology data
412- **No secrets in diagrams** — never include IP credentials, passwords, or SNMP communities in diagram source code
413- **Record in GAIT** — every diagram generation must be logged