e2b_upload_file
Upload or write a file to an E2B sandbox path, creating parent directories as needed and overwriting existing files.
Instructions
Upload/write a file into a sandbox, creating parent directories as needed. Overwrites if it already exists.
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": {
"sandboxId": "<sandboxId>",
"path": "<path>",
"content": "<content>"
},
"name": "e2b_upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Destination path in the sandbox | |
| port | No | Optional envd port; defaults to 49983 | |
| content | Yes | File content, as UTF-8 text or base64 (see `encoding`) | |
| encoding | No | text | |
| username | No | ||
| sandboxId | Yes | E2B sandbox ID | |
| accessToken | No | Optional sandbox access token |