delete_track
Remove a track from a REAPER project by specifying its index. This action is permanent and cannot be undone through REAPER's standard undo system.
Instructions
Delete a track by 0-based index. This is permanent and undoable via REAPER's undo system.
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": {
"track_index": "<track_index>"
},
"name": "delete_track"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/reaper_mcp/server.py:105-111 (handler)The MCP tool definition and handler for delete_track.
@mcp.tool() def delete_track(track_index: int) -> dict[str, Any]: """Delete a track by 0-based index. This is permanent and undoable via REAPER's undo system.""" try: return _wrap(adapter.delete_track(track_index=track_index)) except Exception as exc: return _err(exc) - The adapter method that forwards the call to the underlying bridge client.
def delete_track(self, track_index: int) -> dict[str, Any]: return self._client.call("delete_track", track_index=track_index)