get_track_info
Extract detailed track information including FX and items to facilitate automated mixing and project management in REAPER DAW.
Instructions
Get detailed information about a track including FX and items.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes |
Implementation Reference
- src/reaper_mcp/track_tools.py:107-142 (handler)The actual implementation of the get_track_info tool. It accepts a track_index, retrieves the track via reapy, and returns detailed info including FX list and items (position, length, name).
def get_track_info(track_index: int) -> dict: """Get detailed information about a track including FX and items.""" try: project = get_project() track = project.tracks[track_index] fx_list = [] for i in range(track.n_fxs): fx = track.fxs[i] fx_list.append({"index": i, "name": fx.name, "enabled": fx.is_enabled}) items = [] for i in range(track.n_items): item = track.items[i] items.append({ "index": i, "position": item.position, "length": item.length, "name": item.name, }) return { "success": True, "track_index": track_index, "name": track.name, "volume_db": track.volume, "pan": track.pan, "muted": track.mute, "soloed": track.solo, "fx_count": track.n_fxs, "fx": fx_list, "item_count": track.n_items, "items": items, } except Exception as e: return {"success": False, "error": str(e)} - src/reaper_mcp/track_tools.py:106-106 (registration)The @mcp.tool() decorator that registers get_track_info as an MCP tool.
@mcp.tool() - src/reaper_mcp/track_tools.py:11-11 (registration)The register_tools function is called from server.py to register all track tools including get_track_info.
def register_tools(mcp): - src/reaper_mcp/server.py:11-11 (registration)Import of track_tools.register_tools in the server bootstrap.
from reaper_mcp.track_tools import register_tools as _reg_track - src/reaper_mcp/connection.py:27-29 (helper)The get_project() helper used by get_track_info to obtain the current REAPER project.
def get_project() -> reapy.Project: ensure_connected() return reapy.Project()