exec_python
Execute Python code snippets in a zero-trust sandbox with scrubbed environment variables, POSIX resource limits, and timeout SIGKILL for safe execution.
Instructions
Execute an isolated Python code snippet inside the sandbox with zero-trust scrubbed environment variables, POSIX resource limits, and process-group timeout SIGKILL.
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": "exec_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Optional command-line arguments passed to sys.argv. | |
| code | Yes | Python code snippet to execute inside the isolated OS sandbox. | |
| timeout_seconds | No | Optional execution timeout in seconds (clamped by policy max_timeout_seconds). |