list_tracks
Retrieve a list of all tracks in the current project, showing basic parameters like name, mute, solo, volume, and pan.
Instructions
List all tracks in the current project with their basic parameters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/reaper_mcp/track_tools.py:145-164 (handler)The list_tracks tool handler function. Iterates over all tracks in the current REAPER project and returns their index, name, volume, pan, mute/solo state, FX count, and item count.
def list_tracks() -> dict: """List all tracks in the current project with their basic parameters.""" try: project = get_project() tracks = [] for i in range(project.n_tracks): track = project.tracks[i] tracks.append({ "index": i, "name": track.name, "volume_db": track.volume, "pan": track.pan, "muted": track.mute, "soloed": track.solo, "fx_count": track.n_fxs, "item_count": track.n_items, }) return {"success": True, "count": len(tracks), "tracks": tracks} except Exception as e: return {"success": False, "error": str(e)} - src/reaper_mcp/track_tools.py:11-11 (registration)The register_tools function that decorates list_tracks (and other tools) with @mcp.tool(). This is called from server.py to register the tool with the MCP server.
def register_tools(mcp): - src/reaper_mcp/server.py:11-11 (registration)Import of track_tools.register_tools as _reg_track in the main server file.
from reaper_mcp.track_tools import register_tools as _reg_track - src/reaper_mcp/server.py:21-21 (registration)Invocation of _reg_track(mcp) to register track tools including list_tracks with the MCP server instance.
_reg_track(mcp) - src/reaper_mcp/connection.py:27-29 (helper)The get_project helper function used by list_tracks to obtain the current REAPER project object (ensuring connection first).
def get_project() -> reapy.Project: ensure_connected() return reapy.Project()