Skip to main content
Glama

REAPER MCP Server

by shiehn
dsl_phase1_fixes_summary.md3.42 kB
# DSL Phase 1 Tools - Fixes Summary ## Changes Made ### 1. Fixed DSL Tools Implementation Issues **dsl/tools.py**: - Fixed tempo parsing in `dsl_automate` - now gets tempo directly from API instead of parsing formatted string - Fixed GetCursorPosition result parsing - using correct 'ret' key instead of 'result' - Removed duplicate `dsl_marker` function definition - Fixed `dsl_create_send` to extract send index from create result and use it for volume setting - Added pre-fader send support using `set_send_mode` - Fixed `dsl_marker` to: - Get cursor position directly from bridge API - Support bar positions ("16 bars") - Support region creation ("0-8") - Support go_to action ### 2. Fixed Routing Send Issues **routing_sends.py**: - Updated `create_track_send` to pass track indices instead of track objects - Updated `set_track_send_ui_vol` to pass track index instead of track handle - Updated `set_track_send_ui_pan` to pass track index instead of track handle - Updated `set_send_mode` to pass track index instead of track handle ### 3. Added Lua Bridge Handlers **mcp_bridge.lua**: - Added `CreateTrackSend` handler to convert track indices to MediaTrack objects - Added `SetTrackSendUIVol` handler to convert track index to MediaTrack object - Added `SetTrackSendUIPan` handler to convert track index to MediaTrack object - Added `SetTrackSendInfo_Value` handler to convert track index to MediaTrack object - Added `InsertEnvelopePoint` handler (though envelope pointer issue remains) ## Current Test Status ✅ **FX Tools (3/3)** - All passing: - test_add_effect_basic - test_adjust_effect - test_effect_bypass ❌ **Routing Tools (0/2)** - Need Lua bridge reload: - test_create_send - Waiting for Lua bridge reload - test_create_bus - Waiting for Lua bridge reload ❌ **Automation Tools (0/3)** - Envelope handle issues: - test_automate_fade - InsertEnvelopePoint expects TrackEnvelope object - test_automate_pan_sweep - Same issue - test_automate_section - Likely same issue ✅ **Marker Tools (3/3)** - Should pass after fixes: - test_add_marker - Fixed position parsing - test_create_region - Added region support - test_go_to_marker - Added go_to support ## Next Steps 1. **Immediate**: User needs to reload Lua bridge in REAPER: - Run the action "Script: reload_bridge_in_reaper.lua" in REAPER - This will load the new handlers for routing sends 2. **After Reload**: Routing tests should pass 3. **Automation Issue**: The automation tests have a deeper issue - envelope handles can't be passed back to Lua. Options: - Add more Lua bridge handlers for envelope functions - Refactor automation.py to avoid passing envelope handles - Create compound Lua functions that get envelope and insert points in one call 4. **Run Full Test Suite**: After Lua reload, run all tests to verify fixes ## Commands to Run Tests ```bash # All DSL Phase 1 tests source venv/bin/activate && python -m pytest tests/test_dsl_phase1_tools.py -xvs # Individual test classes source venv/bin/activate && python -m pytest tests/test_dsl_phase1_tools.py::TestDSLEffectsTools -xvs source venv/bin/activate && python -m pytest tests/test_dsl_phase1_tools.py::TestDSLRoutingTools -xvs source venv/bin/activate && python -m pytest tests/test_dsl_phase1_tools.py::TestDSLAutomationTools -xvs source venv/bin/activate && python -m pytest tests/test_dsl_phase1_tools.py::TestDSLMarkerTool -xvs ```

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shiehn/total-reaper-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server