run_python_file
Execute Python files with specified environments, arguments, and timeout settings using subprocess execution.
Instructions
Execute a Python file (always uses subprocess for file execution).
Args:
file_path: Path to the Python file to execute
environment: Name of the Python environment to use
arguments: List of command-line arguments to pass to the script
timeout: Maximum execution time in seconds (default: 300)
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": {
"file_path": "<file_path>"
},
"name": "run_python_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | ||
| arguments | No | ||
| file_path | Yes | ||
| environment | No | default |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |