# Tailscale Tailnet Mermaid Diagram Example
This document shows an example of the Mermaid diagram generated by the `tailscale_status` tool when `include_mermaid_diagram=True`.
## Example Output
When you call:
```python
tailscale_status(include_mermaid_diagram=True)
```
The response includes a `mermaid_diagram` field with Mermaid code that can be rendered in Markdown viewers.
## Sample Diagram
Here's what a typical tailnet diagram looks like:
```mermaid
graph TB
%% Tailnet Topology: 5 devices (4 online, 1 exit nodes, 1 subnet routers, 2 active funnels)
dev0["My-Laptop
š¢ Online
Tags: dev, laptop"]
style dev0 fill:#90EE90,stroke:#333,stroke-width:2px
dev1["Server-Prod
š¢ Online
Exit Node
Tags: server, production"]
style dev1 fill:#90EE90,stroke:#FF6B6B,stroke-width:3px
dev2["Router-Home
š¢ Online
Subnet Router
Tags: router, home"]
style dev2 fill:#90EE90,stroke:#4ECDC4,stroke-width:3px
dev3["Mobile-Device
š¢ Online
Tags: mobile"]
style dev3 fill:#90EE90,stroke:#333,stroke-width:2px
dev4["Old-Device
š“ Offline
Tags: legacy"]
style dev4 fill:#FFB6C1,stroke:#333,stroke-width:2px
subgraph Funnels[Active Funnels š]
funnel8080["Funnel Port 8080
https://my-device.tailnet.ts.net:8080"]
style funnel8080 fill:#FFD700,stroke:#FF8C00,stroke-width:2px
funnel3000["Funnel Port 3000
https://my-device.tailnet.ts.net:3000"]
style funnel3000 fill:#FFD700,stroke:#FF8C00,stroke-width:2px
end
dev0 <--> dev1
dev0 <--> dev2
dev0 <--> dev3
dev0 <--> dev4
subgraph Legend[Legend]
Online["š¢ Online Device"]
Offline["š“ Offline Device"]
Exit["Exit Node"]
Subnet["Subnet Router"]
Funnel["Active Funnel"]
style Online fill:#90EE90
style Offline fill:#FFB6C1
style Exit fill:#90EE90,stroke:#FF6B6B,stroke-width:3px
style Subnet fill:#90EE90,stroke:#4ECDC4,stroke-width:3px
style Funnel fill:#FFD700,stroke:#FF8C00
end
```
## Visual Elements
### Device Nodes
- **š¢ Green nodes**: Online devices
- **š“ Pink nodes**: Offline devices
- **Red border**: Exit nodes (devices that can route traffic to the internet)
- **Teal border**: Subnet routers (devices advertising subnet routes)
- **Device labels**: Show name, online/offline status, and tags
### Funnel Nodes
- **Gold nodes**: Active Funnel services
- **Shown in separate subgraph**: "Active Funnels š"
- **Display**: Port number and public URL
### Connections
- **Bidirectional arrows**: Simplified mesh topology showing devices connected to the tailnet
- **Hub pattern**: First device acts as hub (simplified visualization)
### Legend
- **Color-coded examples**: Shows what each color and style means
- **Only shows relevant items**: Exit nodes, subnet routers, and funnels only appear if present
## Usage
### In Claude Desktop
The Mermaid diagram code is returned in the response and can be:
1. Copied to a Markdown file
2. Rendered in Obsidian, GitHub, GitLab, or other Mermaid-compatible viewers
3. Used in documentation
### Example Response Structure
```json
{
"component": "overview",
"detail_level": "basic",
"timestamp": 1732406400.0,
"status": {
"system": {...},
"devices": {...},
"mermaid_diagram": "graph TB\n %% Tailnet Topology: 5 devices..."
}
}
```
## Benefits
1. **Visual Overview**: Quickly see all devices and their status
2. **Network Topology**: Understand device relationships
3. **Funnel Visibility**: See what services are publicly exposed
4. **Status at a Glance**: Color coding makes it easy to spot issues
5. **Documentation**: Great for network documentation and diagrams
## Rendering
The Mermaid diagram can be rendered in:
- **GitHub/GitLab**: Automatically renders in Markdown files
- **Obsidian**: With Mermaid plugin
- **VS Code**: With Mermaid preview extensions
- **Online**: https://mermaid.live/ (paste the code)
- **Documentation**: Any Markdown viewer with Mermaid support
---
**Last Updated**: 2025-11-24