Skip to main content
Glama

remove_device

Remove a device from an Ableton Live track by specifying the track and device index. This tool helps clean up your arrangement by deleting unwanted audio effects, instruments, or MIDI devices from your project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
device_indexYes

Implementation Reference

  • MCP tool handler for 'remove_device'. Decorated with @mcp.tool() for registration. Forwards command to Ableton remote script via socket connection.
    @mcp.tool() def remove_device(ctx: Context, track_index: int, device_index: int) -> str: try: ableton = get_ableton_connection() result = ableton.send_command("remove_device", {"track_index": track_index, "device_index": device_index}) return f"Removed device '{result.get('device_name')}' from track '{result.get('track_name')}'" except Exception as e: logger.error(f"Error removing device: {str(e)}") return f"Error removing device: {str(e)}"
  • Core implementation of device removal in Ableton Live remote script. Accesses track.devices[device_index] and calls track.remove_device(device). Called from _process_command dispatcher.
    def _remove_device(self, track_index, device_index): """Remove a device from a track""" try: if track_index < 0 or track_index >= len(self._song.tracks): raise IndexError("Track index out of range") track = self._song.tracks[track_index] if device_index < 0 or device_index >= len(track.devices): raise IndexError("Device index out of range") device = track.devices[device_index] device_name = device.name # Remove the device track.remove_device(device) result = { "removed": True, "device_name": device_name, "track_name": track.name } return result except Exception as e: self.log_message("Error removing device: " + str(e)) raise

Latest Blog Posts

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/Milesy1/MCP-Ableton-API'

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