run_script
Run Lua inside REAPER with the full ReaScript API: pass code (source text) or path (a .lua file; relative paths resolve under the daemon folder, then REAPER's Scripts folder).
Instructions
Run Lua inside REAPER with the full ReaScript API: pass code (source text) or path (a .lua file; relative paths resolve under the daemon folder, then REAPER's Scripts folder). The script's return value and anything it printed with ShowConsoleMsg come back in the reply; reaper.defer is not available (the script must finish in one pass) and it is stopped after timeout_seconds (default 30). Project changes land in one undo block. Off until allow_script_execution is true in bridge_config.json (python3 setup/install.py --allow-script-execution).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Passed to the chunk as ... and as the global args. | |
| code | No | ||
| path | No | ||
| dry_run | No | Preview: return what would run without changing the project. | |
| timeout_seconds | No |