script_run
Runs a ReaScript from REAPER's Scripts folder and returns the script's result if reported. Requires explicit user confirmation for arbitrary local code execution.
Instructions
Run a ReaScript from REAPER's own Scripts folder and optionally read back a result.
script_path must be one of the relative paths script_list returned. Registers the script as a REAPER action if it isn't already (safe to call every time), runs it, then waits up to wait_seconds for the script to report a result via reaper.SetExtState("reaper_mcp_script_result", "last_result", , false). Scripts that don't opt into this convention — including anything that hasn't finished running (e.g. a background/defer-based script) by the time wait_seconds elapses — come back with result_found: false.
This runs arbitrary local script code. Confirm with the user before calling this unless they've already given clear, specific instruction to run this exact script.
Args: script_path: Relative path from script_list, e.g. "MyScripts/foo.lua". wait_seconds: How long to wait for a result, 0-30. Default 5.0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script_path | Yes | ||
| wait_seconds | No |