efs_python
Run Python code with persistent sessions, preserving variables between calls for stateful scripting and automation.
Instructions
Execute Python code. Supports persistent named sessions (variables kept between calls). Parameters: code (required), sessionId, cwd, timeout, restart.
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": "efs_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory (optional) | |
| code | Yes | Python code to execute | |
| restart | No | Restart the session (default: false) | |
| timeout | No | Timeout in milliseconds (default: 30000) | |
| sessionId | No | Session ID for persistent state (optional) |