Skip to main content
Glama

Open a capture: a handle for the next calls

open_capture
Read-onlyIdempotent

Pins 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

NameRequiredDescriptionDefault
endNoSame forms as start
pathYesCapture file (absolute, in an allowed dir) or open_capture handle
startNoISO 8601, epoch s, +Ns from start, -Ns from end
filterNoExtra display filter, ANDed
redactNoReplace subscriber identifiers in this result with tokens; ids+ips hides every IP toooff

Output Schema

NameRequiredDescriptionDefault
endNo
pathNo
errorNo
mtimeNo
startNo
usageNo
filterNo
handleNo
windowNo
packetsNo
size_bytesNo
last_packetNo
first_packetNo

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?

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial behavior beyond them: the handle's lifetime, invalidation on file change and server restart with their error names, and the memory-cache reuse of tshark output surfaced as `cache` in results. It even clarifies precedence rules for per-call `start`/`end` versus the handle window.

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 purpose and return artifact, then progressively adds lifecycle and caching detail; every sentence carries information. Slightly dense, and the trailing pointer to 'resource schema://tools/open_capture' is redundant given the surrounding detail.

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 a stateful-handle tool with an output schema, the description covers what an agent needs: handle format, substitution targets, inherited filters/windows, cache behavior, and the two failure modes with recovery. Nothing essential about calling it correctly is 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 real semantics the schema cannot express: `filter` and `start`/`end` given at open time are inherited by every later call, a call's own window replaces it, and its own filter is ANDed. Only `redact` is left to the schema.

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 ('Pin one capture') and states the concrete output artifact ('returns a handle ("cap:...")') plus its downstream role. This distinguishes it from siblings like capture_metadata or filter_packets, which operate on a capture rather than creating a reusable handle for one.

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 a clear use case ('an investigation of several calls') and explains how the handle substitutes for `path`, `path_a`, and `path_b` in later calls. It also covers reuse and failure recovery (re-open after `stale_handle`/`unknown_handle`), though it never explicitly says when a one-shot `path` argument is preferable to opening a handle.

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