Skip to main content
Glama
WLAN-Pi
by WLAN-Pi

fetch_pcap_file

Retrieve a stopped packet capture's pcapng file as a binary blob for analysis in Wireshark or tshark. Specify the capture ID or a path inside the managed capture directory to download the complete capture.

Instructions

Fetch a non-streaming capture's pcapng file as a binary blob.

Returns the raw pcapng file (mime application/vnd.tcpdump.pcapng) for the capture named by capture_id (preferred) or by an explicit on-device path. Open it in Wireshark/tshark for analysis. Fetch after the capture has stopped for a complete file; fetching a still-running capture returns only the bytes written so far.

For safety this reads only files under the server's managed capture directory; any other path is refused.

Args: capture_id: The capture_id from start_pcap_file/list_pcap_files. path: Alternatively, the on-device file path (must be inside the managed capture directory). session_id: Deprecated alias for capture_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
capture_idNo
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral disclosure burden. It discloses the binary/mime type, the partial-data behavior when the capture is still running, and the safety restriction that only files under the managed capture directory are readable. It could also mention error behavior for missing captures, but the output schema likely covers the return format.

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?

The description is well-structured and front-loaded: the first sentence states exactly what the tool does, followed by return format, timing caveat, safety restriction, and an organized Args section. Every sentence adds operational value with no filler.

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?

The description covers the essential operational context: return type, when to call, partial results, path safety, and parameter sources. The main gap is that the schema marks all three parameters as optional, and the description does not explicitly state that exactly one of capture_id/path/session_id must be supplied, or what happens if multiple are provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully explain the parameters, and it does. It explains capture_id as coming from start_pcap_file/list_pcap_files, path as an alternative on-device path within the managed directory, and session_id as a deprecated alias. This adds substantial meaning beyond the bare schema properties.

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 description states a precise verb and object: it fetches a non-streaming capture's pcapng file as a binary blob. It distinguishes itself from sibling tools like start_pcap_file, stop_pcap_file, and list_pcap_files by focusing on retrieving the raw capture file content rather than managing capture sessions.

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?

The description gives clear usage context: fetch after the capture has stopped for a complete file, and note that fetching a running capture returns partial bytes. It also clarifies that capture_id is preferred over path. It does not explicitly name alternatives or exclusions, but the timing and parameter-preference guidance are clear enough for an agent to decide correctly.

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