Skip to main content
Glama

Download a file or folder from a snapshot

read_snapshot_file
Read-onlyIdempotent

Download files or folders directly from a snapshot without contacting the machine. Stream single files or folder subtrees as tar archives for stopped or archived sandboxes.

Instructions

Download a file or folder from a snapshot. Stream a single file's bytes, or a folder subtree as a tar archive, directly out of a snapshot, the sandbox can be stopped or archived; the machine is never contacted. Use GET /snapshots/{snapshotId}/tree to list paths, then pass one here. Paths are relative to the snapshot root (same space as tree entries; docker volumes under __dockervol__/). An empty or / path downloads the whole snapshot as a tar. Folder responses set X-Snapshot-File-Count, X-Snapshot-Total-Size-Bytes and X-Snapshot-Skipped-Base-Image-Files headers; both response shapes set X-Snapshot-Entry-Kind (file or dir). File responses accept a single Range: bytes= header and answer 206 with Content-Range, so large files can be downloaded in parts and resumed.

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": {
      "snapshotId": "<snapshotId>"
    },
    "name": "read_snapshot_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile or folder path inside the snapshot. Empty for the whole snapshot.
snapshotIdYesSnapshot id returned by the snapshot list/latest calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent safety, but the description adds substantial behavior: works against stopped or archived sandboxes without contacting the machine, folder responses emit count/size/skipped headers, entry kind is signalled, and Range requests return 206 with Content-Range for resumable partial downloads. These are real operational traits not present in the annotations.

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?

Dense but well ordered: purpose first, then mode behavior, then path conventions, then response headers and Range support. The header enumeration is slightly heavy, but each detail is actionable rather than filler.

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?

With no output schema, the description compensates by describing both response shapes, the signalling headers, and range/resume semantics. For a two-parameter read tool with full annotation coverage, an agent has everything needed to call it correctly.

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 genuine meaning: paths are relative to the snapshot root and share the namespace of tree entries, docker volumes live under __dockervol__/, and empty or '/' means the whole snapshot as a tar. That extends beyond the schema's brief 'Empty for the whole snapshot' note.

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 ('Download a file or folder from a snapshot') and immediately disambiguates the two modes: single file bytes versus a folder subtree as a tar archive. This clearly separates it from sibling file tools like read_file or list_snapshot_files.

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?

Explicitly prescribes the sequence: list paths via the snapshot tree endpoint, then pass one here. It also clarifies the operational context (sandbox stopped or archived, machine never contacted). It does not explicitly contrast against create_download_url or read_file, so it stops short of full alternative routing.

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