run_python
Execute a single Python code snippet for stateful or dependent operations. Set working directory and timeout for each run.
Instructions
Execute a single Python code snippet. Use for stateful/dependent operations. Use run_python_batch for parallel independent tasks. Max 1MB code, 60s timeout. See README.md for usage examples and helper utilities.
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": "run_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| code | Yes | ||
| timeout | No |