reaper_eval
Execute arbitrary Lua inside REAPER to control projects, tracks, and rendering when no typed tool fits; returned values are sent back as JSON.
Instructions
Execute arbitrary Lua inside REAPER. The reaper global is available; values you return are sent back as JSON. Use this for anything not covered by a typed tool. Example: return reaper.GetNumTracks(). If you pass args, it is exposed in the chunk as the variable args.
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": "reaper_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| code | Yes | ||
| undo | No | ||
| label | No | eval |