execute_python
Execute Python code with persistent variables in a REPL environment. Reset the session to clear variables when needed.
Instructions
Execute Python code and return the output. Variables persist between executions.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | Python code to execute | |
reset | No | Reset the Python session (clear all variables) |
Input Schema (JSON Schema)
{
"properties": {
"code": {
"description": "Python code to execute",
"type": "string"
},
"reset": {
"default": false,
"description": "Reset the Python session (clear all variables)",
"type": "boolean"
}
},
"required": [
"code"
],
"type": "object"
}