Download a file or folder from a snapshot
read_snapshot_fileDownload 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
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File or folder path inside the snapshot. Empty for the whole snapshot. | |
| snapshotId | Yes | Snapshot id returned by the snapshot list/latest calls. |