Skip to main content
Glama

decode_protocol

Read-only

Extract targeted protocol fields from pcap files. Use curated defaults for DNS, HTTP, etc., or specify your own fields. Results returned as a tab-separated table; apply filters to refine output.

Instructions

Extract protocol-specific fields from a pcap file using tshark '-T fields'. Pass a known protocol name to use curated defaults (supported: dns, goose, http, icmp, mms, sip, sv, tls), or supply your own 'fields' list for any other protocol. Returns a tab-separated table — much smaller than full JSON. Use a 'filter' to narrow results (e.g. only request packets, only specific stNum values).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .pcap or .pcapng file
protocolYesProtocol name or display filter (e.g. 'http', 'goose', 'mms', 'sv', 'sip', or any tshark display filter such as 'icmp.type == 8')
fieldsNoOptional override of the field list. If omitted and the protocol has curated defaults, those are used. Required for protocols without defaults. Max 20 fields.
filterNoOptional additional display filter ANDed with the protocol filter (e.g. 'goose.stNum >= 5'). Numeric comparisons with == != >= <= are supported.
packet_countNoMaximum number of packets to return (default: 50)
Behavior5/5

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

The description discloses the output format (tab-separated table) and size benefit ('much smaller than full JSON'), and mentions the underlying tshark command. Annotations already declare readOnlyHint=true, and the description adds relevant behavioral context without contradiction.

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

Conciseness5/5

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

Three sentences, each carrying distinct value: purpose and method, protocol options, and output/filter guidance. No redundant or filler content.

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?

For a 5-parameter tool without output schema, the description covers purpose, input, output format, supported protocols, custom fields, and filter usage. It omits error handling details but is otherwise thorough and actionable.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds meaning beyond descriptions: it explains the relationship between protocol and fields (curated defaults vs custom), imposes a max of 20 fields, clarifies filter ANDs with protocol filter, and notes default packet_count of 50.

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?

The description clearly states the tool extracts protocol-specific fields from pcap files using tshark '-T fields', lists supported protocols, and allows custom fields. It distinguishes itself from sibling tools like read_pcap (full dump) and export_json (JSON output) by specifying tab-separated output.

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?

The description provides explicit context: use curated defaults for supported protocols, supply custom fields for others, and apply optional filters. It lacks explicit when-not-to-use scenarios but implies alternatives through sibling tool names and the focus on field extraction.

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