load_instrument_or_effect
Load instruments or audio effects into Ableton Live tracks to enhance music production workflows and expand creative sound design capabilities.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| uri | Yes |
Implementation Reference
- MCP_Server/server.py:350-369 (handler)The main handler function for the load_instrument_or_effect MCP tool. It connects to Ableton, sends a 'load_browser_item' command with the track_index and uri, and returns a formatted success or error message based on the result.@mcp.tool() def load_instrument_or_effect(ctx: Context, track_index: int, uri: str) -> str: try: ableton = get_ableton_connection() result = ableton.send_command("load_browser_item", { "track_index": track_index, "item_uri": uri }) if result.get("loaded", False): new_devices = result.get("new_devices", []) if new_devices: return f"Loaded instrument with URI '{uri}' on track {track_index}. New devices: {', '.join(new_devices)}" else: devices = result.get("devices_after", []) return f"Loaded instrument with URI '{uri}' on track {track_index}. Devices on track: {', '.join(devices)}" else: return f"Failed to load instrument with URI '{uri}'" except Exception as e: logger.error(f"Error loading instrument by URI: {str(e)}") return f"Error loading instrument by URI: {str(e)}"