execute_lua
Run Lua code to control REAPER DAW through its ReaScript API, enabling automation and custom functionality within the digital audio workstation.
Instructions
Execute arbitrary Lua code in REAPER.
This gives full control over REAPER via ReaScript.
The code runs in REAPER's Lua environment with access to the reaper.* API.
Args:
code: Lua code to execute
Example:
execute_lua("reaper.ShowMessageBox('Hello from MCP!', 'Test', 0)")
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": {
"code": "<code>"
},
"name": "execute_lua"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |