unreal_run_python_script
Run existing Python scripts from the repo's scripts/ folder via headless commandlet. Pass optional arguments to sys.argv and capture filtered output lines marked with 'MCP |LogPython'.
Instructions
Run an existing python script from the repo scripts/ folder through a headless commandlet. Optional args reach the script via sys.argv (no whitespace in an arg). Output is filtered to marker lines (default: 'MCP |LogPython') — have your script unreal.log() what matters.
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": "unreal_run_python_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| dryRun | No | ||
| script | Yes | Repo-relative path under scripts/, e.g. scripts/render_enables.py | |
| outputFilter | No | Regex for which log lines to return | |
| timeoutSeconds | No | ||
| allowWithEditorOpen | No |