execute_python
Execute Python code in a secure E2B sandbox to test scripts, manage files, and install packages without affecting your local environment.
Instructions
Execute Python code in an E2B sandbox environment
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": {
"code": "<code>"
},
"name": "execute_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python code to execute | |
| sandbox_id | No | Optional sandbox ID to use specific sandbox |