Skip to main content
Glama

Filter packets

filter_packets
Read-onlyIdempotent

Select packets in a capture with a Wireshark display filter and return rows of chosen tshark fields, covering protocols that dedicated tools do not handle.

Instructions

Return packets matching a Wireshark display filter as rows of fields. Default fields: frame.number, frame.time_epoch, ip.src, ip.dst, _ws.col.protocol, _ws.col.info. Pass fields (tshark field names such as "diameter.cmd.code") to choose your own; unknown names are rejected. Multiple occurrences of a field are joined with commas. Use this for anything the dedicated protocol tools do not cover.

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": {
      "path": "<path>",
      "display_filter": "<display_filter>"
    },
    "name": "filter_packets"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoSame forms as start
pathYesCapture file (absolute, in an allowed dir) or open_capture handle
limitNoMost rows per page
startNoISO 8601, epoch s, +Ns from start, -Ns from end
fieldsNotshark field names to return per packet (default: a short summary)
offsetNoRows to skip (next_offset)
outputNosummary: all but rows, plus 3 rows (<8 KB)rows
redactNoReplace subscriber identifiers in this result with tokens; ids+ips hides every IP toooff
columnsNoRow keys to keep (frame keys stay)
max_output_kbNoLower output cap, KB
display_filterYesWireshark display filter selecting the packets

Output Schema

NameRequiredDescriptionDefault
countNo
errorNo
fieldsNo
offsetNo
windowNo
droppedNo
packetsNo
has_moreNo
returnedNo
next_offsetNo
total_foundNo
total_matchedNo
display_filterNo
packets_matchedNo
packets_scannedNo
total_is_lower_boundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds genuine behavior the annotations do not: the default field set, rejection of unknown field names (an error mode), and comma-joining of repeated field occurrences. Pagination, the summary output mode, and redaction are left entirely to the schema.

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?

Four sentences, front-loaded with purpose and output shape, then defaults, then field-selection mechanics, then routing. Every sentence carries information an agent would otherwise have to guess.

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?

With 11 parameters, an output schema present, and full annotations, the description covers the parts that matter most: what is returned, the default fields, and how custom fields behave. It is slightly thin on result-size and paging behavior (limit/offset/max_output_kb), though the schema documents those fields.

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%, so the baseline would be 3, but the description earns above that by making the implicit default concrete (the six named fields) and by specifying rejection of unknown names plus the comma-join rule for multi-occurrence fields. Those are semantics the schema's terse 'tshark field names' wording does not convey.

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 first sentence gives a concrete verb (return), resource (packets matching a Wireshark display filter), and output shape (rows of fields), which tells an agent exactly what comes back. The closing sentence routes it as the catch-all relative to the dedicated protocol tools, so it is distinguishable without opening the schema.

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?

Explicit guidance is given: use this for anything the dedicated protocol tools do not cover, which frames it as the fallback. It does not name a specific alternative or state a when-not condition beyond that, so it stops short of full routing guidance.

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