Execute Python
execute_pythonRun Python code securely in a WebAssembly sandbox to execute scripts and return output. Supports pure Python without external dependencies.
Instructions
Execute Python code in a secure isolated WebAssembly sandbox. Both standard output (print statements) and the last evaluated expression are returned. Supports pure Python only (no C extensions like numpy/pandas).
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. Standard output and the final expression are returned. |