list_sends
List all sends from a specified track to view routing connections in your REAPER project.
Instructions
List all sends from a track.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes |
Implementation Reference
- src/reaper_mcp/mixing_tools.py:93-109 (handler)The 'list_sends' tool handler function. It takes a track_index, iterates over all sends on that track using REAPER's API (GetTrackNumSends, GetTrackSendInfo_Value), and returns a list of sends with volume, pan, and mute status.
@mcp.tool() def list_sends(track_index: int) -> dict: """List all sends from a track.""" try: project = get_project() track = project.tracks[track_index] n = RPR.GetTrackNumSends(track.id, 0) sends = [] for i in range(n): vol = RPR.GetTrackSendInfo_Value(track.id, 0, i, "D_VOL") pan = RPR.GetTrackSendInfo_Value(track.id, 0, i, "D_PAN") muted = bool(RPR.GetTrackSendInfo_Value(track.id, 0, i, "B_MUTE")) sends.append({"send_index": i, "volume_linear": vol, "pan": pan, "muted": muted}) return {"success": True, "track_index": track_index, "sends": sends} except Exception as e: return {"success": False, "error": str(e)} - src/reaper_mcp/mixing_tools.py:17-17 (registration)The 'register_tools' function decorates 'list_sends' with @mcp.tool(), registering it as an MCP tool.
def register_tools(mcp): - src/reaper_mcp/server.py:15-15 (registration)The mixing_tools module (containing list_sends) is imported in server.py.
from reaper_mcp.mixing_tools import register_tools as _reg_mixing - src/reaper_mcp/server.py:25-25 (registration)The mixing_tools registration function is called to register all mixing tools including list_sends.
_reg_mixing(mcp) - src/reaper_mcp/connection.py:27-29 (helper)The get_project helper function used by list_sends to obtain the REAPER project reference.
def get_project() -> reapy.Project: ensure_connected() return reapy.Project()