protocol_stats
Run aggregate network statistics on pcap files using tshark, returning parsed protocol hierarchies, conversations, endpoints, and per-protocol tables.
Instructions
Run a tshark '-z' aggregate-statistics report on a pcap file and return its parsed output. Use this for protocol-hierarchy, conversation, endpoint, and per-protocol stat tables — much more compact than per-packet JSON. Supported (protocol, variant) pairs: conv: eth, ip, ipv6, tcp, udp; dns: tree; endpoints: eth, ip, ipv6, tcp, udp; http: stat, tree; http_req: tree; io: phs, stat; rpc: srt; sip: stat; smb: srt; smb2: srt.
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": {
"file_path": "<file_path>",
"protocol": "<protocol>",
"variant": "<variant>"
},
"name": "protocol_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variant | Yes | Variant within the family: e.g. 'phs', 'stat', 'tree', 'srt', 'ip', 'ipv6', 'tcp', 'udp', 'eth' | |
| protocol | Yes | Stat family: 'io', 'conv', 'endpoints', 'http', 'http_req', 'dns', 'smb', 'smb2', 'rpc', 'sip' | |
| file_path | Yes | Path to the .pcap or .pcapng file | |
| max_lines | No | Maximum number of output lines to return (default: 100). Conversation/endpoint tables can be very long. |