bypass_fx
Control whether an FX plugin on a specific track is enabled or disabled by setting its bypass state using track and FX indices.
Instructions
Enable or bypass (disable) an FX plugin on a track.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| fx_index | Yes | ||
| bypassed | Yes |
Implementation Reference
- src/reaper_mcp/fx_tools.py:121-137 (handler)The actual handler function for the bypass_fx tool. It takes track_index, fx_index, and bypassed (bool) parameters, gets the project, finds the track and FX, and sets fx.is_enabled = not bypassed to enable or bypass the FX plugin.
@mcp.tool() def bypass_fx(track_index: int, fx_index: int, bypassed: bool) -> dict: """Enable or bypass (disable) an FX plugin on a track.""" try: project = get_project() track = project.tracks[track_index] fx = track.fxs[fx_index] fx.is_enabled = not bypassed return { "success": True, "track_index": track_index, "fx_index": fx_index, "fx_name": fx.name, "bypassed": bypassed, } except Exception as e: return {"success": False, "error": str(e)} - src/reaper_mcp/fx_tools.py:11-11 (registration)The registration function that takes an mcp instance. The @mcp.tool() decorator on bypass_fx registers it as an MCP tool.
def register_tools(mcp): - src/reaper_mcp/server.py:20-28 (registration)The bypass_fx tool is registered when _reg_fx(mcp) is called (line 23), which invokes register_tools from fx_tools.py. _reg_fx is imported from reaper_mcp.fx_tools at line 13.
_reg_project(mcp) _reg_track(mcp) _reg_midi(mcp) _reg_fx(mcp) _reg_audio(mcp) _reg_mixing(mcp) _reg_render(mcp) _reg_mastering(mcp) _reg_analysis(mcp) - src/reaper_mcp/connection.py:27-29 (helper)The get_project() helper function used by bypass_fx to obtain the current REAPER project. It calls ensure_connected() first, then returns reapy.Project().
def get_project() -> reapy.Project: ensure_connected() return reapy.Project()