sandbox_copy_out
Copy files or folders from a sandbox to your computer's transfer folder so results can be saved before the sandbox is destroyed.
Instructions
Copy a file or a whole folder from a sandbox to the user's computer.
Use this to save results (a report, a built program, a log, an output folder) before destroying the sandbox, since everything inside a sandbox is lost when it is destroyed. Things can only be written inside the user's designated transfer folder.
guest_path: full path of the file or folder inside the sandbox (for example "/home/debian/out.txt" or "/home/debian/build"). host_path: where to save it, relative to the transfer folder (for example "results/out.txt" or "results/build"). Missing folders are created; existing files with the same names are replaced. Paths that leave the transfer folder are rejected.
When copying a folder, its contents are placed inside host_path. Links and files whose names are not valid on the user's computer are left out; the reply says how many. Returns the full path where it was saved, the number of files and the size.
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": {
"sandbox_id": "<sandbox_id>",
"guest_path": "<guest_path>",
"host_path": "<host_path>"
},
"name": "sandbox_copy_out"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host_path | Yes | ||
| guest_path | Yes | ||
| sandbox_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |