Inspect Packet Capture
inspect_packet_captureInspect 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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute local capture path | |
| fields | Yes | TShark field names to return, e.g. ip.addr, usb.endpoint_address, btatt.opcode; frame.number is always included | |
| two_pass | No | Use two-pass analysis for fields requiring later packets; false requests a single pass | |
| decode_as | No | Explicit TShark decode-as selections, e.g. tcp.port==8888,http | |
| match_limit | No | Return at most this many matching packets after filtering; default 50. Null explicitly returns all remaining matches within producer resource limits. | |
| match_offset | No | Skip this many matching packets after filtering; default 0 | |
| packet_limit | No | Maximum input packets to read before filtering; omitted scans to EOF within resource limits | |
| display_filter | No | Optional Wireshark display filter (-Y), applied within the read limit |