execute_python_code
Execute Python code in a restricted subprocess to deterministically verify math, logic, and code analysis tasks using symbolic engines.
Instructions
Executes Python code in a subprocess with restricted environment variables. Note: This runs with server privileges; ensure inputs are trusted.
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_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The Python code to execute. | |
| background | No | Execute asynchronously in the background and return a tracking job_id. Set to True for heavy logic verifications. |