Skip to main content
Glama

protocol_stats

Read-only

Run aggregate statistics reports on pcap files using tshark's -z option. Get compact summaries of protocol hierarchy, conversations, endpoints, and per-protocol stats.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .pcap or .pcapng file
protocolYesStat family: 'io', 'conv', 'endpoints', 'http', 'http_req', 'dns', 'smb', 'smb2', 'rpc', 'sip'
variantYesVariant within the family: e.g. 'phs', 'stat', 'tree', 'srt', 'ip', 'ipv6', 'tcp', 'udp', 'eth'
max_linesNoMaximum number of output lines to return (default: 100). Conversation/endpoint tables can be very long.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true. Description adds behavioral context: invokes tshark, returns parsed output, lists supported pairs. No contradictions. Adequate disclosure of side-effect-free operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Reasonably concise; key information is front-loaded. The supported-pairs list is a bit lengthy but well-organized and essential for correct usage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers tool purpose, usage context, parameter details, supported values. Lacks return format description but no output schema exists; annotations provide readOnly hint. Adequate for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with good descriptions. Description adds value by compactly listing all supported (protocol, variant) combinations, aiding correct argument selection beyond schema's generic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it runs tshark aggregate statistics on a pcap file and returns parsed output. Differentiates from per-packet JSON tools. Lists supported protocol/variant pairs for clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides guidance to use for protocol-hierarchy, conversation, endpoint, and per-protocol stat tables, noting compactness vs. per-packet JSON. Implicitly contrasts with sibling tools like decode_protocol or display_filter, but no explicit when-not-to-use or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/khuynh22/mcp-wireshark'

If you have feedback or need assistance with the MCP directory API, please join our Discord server