run_python_file
Execute a .py file from disk via Unreal Editor's embedded Python, avoiding escaping issues for complex scripts. Capture results with unreal.log markers and get_log_lines.
Instructions
Execute a .py file from disk via the editor's embedded Python. Complement to execute_unreal_python -- avoids escaping pain for non-trivial scripts. Output capture caveat: ExecuteFile mode does not return stdout/eval-result; use unreal.log marker + get_log_lines to round-trip results.
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_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Filesystem path to a .py file. Absolute or relative; relative paths resolve against the editor's CWD (typically the project root). |