execute_python
Execute Python code and retrieve output. Variables persist across runs for stateful workflows.
Instructions
Execute Python code and return the output. Variables persist between executions.
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 | |
| reset | No | Reset the Python session (clear all variables) |