ue_run_python
Execute Python scripts in the active Unreal Engine editor and return the script's serializable result variable to the caller, enabling editor automation and inspection.
Instructions
Execute Python in the active editor and return the script's result variable.
Use ue_capabilities() to check the binding. Assign a serializable value to result to return it to the caller. Native Python sends print output to LogPython and requires top-level imports. After execution_unknown, inspect the editor before repeating a script that changes assets.
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": {
"script": "<script>"
},
"name": "ue_run_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |