run_python_script
Execute Python scripts with custom arguments and timeout limits while restricting execution to the workspace boundary.
Instructions
Execute a Python script file.
The script must be within the workspace boundary. Uses the active virtual environment's Python if one is registered in the session.
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": {
"path": "<path>"
},
"name": "run_python_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Optional command-line arguments to pass to the script. | |
| path | Yes | Path to the .py script (absolute or relative to cwd). | |
| timeout | No | Maximum execution time in seconds. Default: 120. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||