e2b_read_file
Read a file stored in an E2B sandbox and get its content as UTF-8 text or base64.
Instructions
Read a file from a sandbox. Returns its content as UTF-8 text or base64.
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>"
},
"name": "e2b_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file, absolute or home-relative | |
| port | No | Optional envd port; defaults to 49983 | |
| encoding | No | text | |
| username | No | ||
| sandboxId | Yes | E2B sandbox ID | |
| accessToken | No | Optional sandbox access token |