Open a capture: a handle for the next calls
open_capturePins one packet capture for multi-call investigations and returns a reusable handle so later capture calls can share filters, time windows, and cached results without passing the file path again.
Instructions
Pin one capture for an investigation of several calls: returns a handle ("cap:..."),
accepted by every capture tool in place of path (also path_a/path_b). A filter and a
start/end window given here apply to every later call on the handle (a call's own
start/end replaces the window; its own filter is ANDed). Later calls on the same file
reuse tshark's output from a memory cache when they repeat a run (cache in a result counts
the reused runs). A handle stops working when the file changes (stale_handle) or the server
restarts (unknown_handle): call open_capture again.
More detail: resource schema://tools/open_capture.
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>"
},
"name": "open_capture"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Same forms as start | |
| path | Yes | Capture file (absolute, in an allowed dir) or open_capture handle | |
| start | No | ISO 8601, epoch s, +Ns from start, -Ns from end | |
| filter | No | Extra display filter, ANDed | |
| redact | No | Replace subscriber identifiers in this result with tokens; ids+ips hides every IP too | off |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| path | No | ||
| error | No | ||
| mtime | No | ||
| start | No | ||
| usage | No | ||
| filter | No | ||
| handle | No | ||
| window | No | ||
| packets | No | ||
| size_bytes | No | ||
| last_packet | No | ||
| first_packet | No |