run_python_file
Execute a Python file with specified arguments and environment settings. Processes file paths, custom environments, and command-line inputs to return script results efficiently for development workflows.
Instructions
Execute a Python file and return the result.
Args:
file_path: Path to the Python file to execute (relative to working directory or absolute if system access is enabled)
environment: Name of the Python environment to use (default if custom path provided, otherwise system)
arguments: List of command-line arguments to pass to the script
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 |
|---|---|---|---|
| arguments | No | ||
| environment | No | default | |
| file_path | Yes |