Upload a file into a sandbox
upload_fileWrite a file into the sandbox at an absolute path (parent directories are created). Give content for UTF-8 text OR content_base64 for binary. Limit 5 MB per file inline — for bigger files call get_upload_url and PUT the bytes to the link (no base64 through this chat). Optional mode like "755". Requires: token + live sandbox_id. Max 5 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Optional. File permissions in octal, 3–4 digits, e.g. "644" or "755". Default: the sandbox default. | |
| path | Yes | Required. Absolute path inside the sandbox to write; parent directories are created, e.g. "/root/app/main.py". Must start with "/". | |
| content | No | Optional. File content as UTF-8 text. Give either `content` or `content_base64` (default: empty file). | |
| sandbox_id | Yes | Required. Sandbox id as returned by create_sandbox / list_sandboxes, e.g. "sb_3f2a…". | |
| content_base64 | No | Optional. File content as base64 for binary files, up to 5 MB decoded. Use instead of `content`. |