Skip to main content
Glama

Inspect Packet Capture

inspect_packet_capture
Idempotent

Inspect caller-selected fields in an existing local packet capture with TShark to return filtered, paged frames and inline evidence for offline protocol analysis.

Instructions

Inspect caller-selected fields in an existing local packet capture with TShark 4.x. Return 50 matching frames by default, with match_offset/match_limit paging and coverage counts; match_limit:null requests all remaining matches. Preserve repeated values, frame numbers, display filter, decode-as rules and pass mode in inline Evidence with source/tool identity and diagnostics. Optional packet_limit counts input packets before filtering; output paging does not shorten dissection or two-pass reassembly. Requires Linux, util-linux prlimit, and absolute REA_TSHARK_COMMAND. File-only analysis; no live capture or device communication. Missing fields or no matches do not establish absence of device traffic.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "/artifacts/device.pcapng",
      "fields": [
        "ip.addr",
        "udp.port",
        "data.data"
      ],
      "two_pass": true,
      "decode_as": [],
      "packet_limit": null,
      "display_filter": "udp"
    },
    "name": "inspect_packet_capture"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute local capture path
fieldsYesTShark field names to return, e.g. ip.addr, usb.endpoint_address, btatt.opcode; frame.number is always included
two_passNoUse two-pass analysis for fields requiring later packets; false requests a single pass
decode_asNoExplicit TShark decode-as selections, e.g. tcp.port==8888,http
match_limitNoReturn at most this many matching packets after filtering; default 50. Null explicitly returns all remaining matches within producer resource limits.
match_offsetNoSkip this many matching packets after filtering; default 0
packet_limitNoMaximum input packets to read before filtering; omitted scans to EOF within resource limits
display_filterNoOptional Wireshark display filter (-Y), applied within the read limit

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=true, destructiveHint=false) by disclosing runtime prerequisites, default return size, paging semantics, the interaction between paging and dissection/two-pass reassembly, and the inline Evidence structure with source/tool identity and diagnostics. It also warns that missing fields or no matches do not establish absence of device traffic, a genuine interpretive caveat not present in any structured field.

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?

Front-loaded with the action and default return shape, then the operational constraints, then the caveat. It is a dense single block rather than a structured list, but nearly every clause carries distinct information and little is redundant.

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

Completeness5/5

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

For an 8-parameter tool with no output schema, the description covers return cardinality ('50 matching frames by default'), paging plus coverage counts, the Evidence payload shape, and environment prerequisites. Nothing an agent needs to invoke it correctly or interpret an empty result appears to be missing.

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 is 3, but the description adds meaning beyond it: the distinction that packet_limit counts input packets before filtering while output paging does not shorten dissection or two-pass reassembly is not derivable from the schema alone. match_offset/match_limit are framed as paging with match_limit:null meaning all remaining matches, reinforcing edge-case behavior.

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?

States a specific verb and resource ('Inspect caller-selected fields in an existing local packet capture with TShark 4.x') and bounds the scope with 'File-only analysis; no live capture or device communication', which separates it from the live-capture siblings. An agent can decide to call it 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?

Gives clear applicability conditions and exclusions: requires Linux, util-linux prlimit, and an absolute REA_TSHARK_COMMAND, and explicitly rules out live capture and device communication. It does not name a sibling alternative to use instead when the target is live traffic, but the when/when-not boundary is otherwise explicit.

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

Deploy Server

Other Tools