get_track_info
Retrieve detailed information about a specific track in Ableton Live sessions to analyze track properties and settings.
Instructions
Get detailed information about a specific track in Ableton.
Parameters:
track_index: The index of the track to get information about
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes |
Implementation Reference
- MCP_Server/server.py:272-286 (handler)MCP tool handler for 'get_track_info'. Connects to Ableton remote script via socket, sends command with track_index, receives and returns JSON-formatted track details.@mcp.tool() def get_track_info(ctx: Context, track_index: int) -> str: """ Get detailed information about a specific track in Ableton. Parameters: - track_index: The index of the track to get information about """ try: ableton = get_ableton_connection() result = ableton.send_command("get_track_info", {"track_index": track_index}) return json.dumps(result, indent=2) except Exception as e: logger.error(f"Error getting track info from Ableton: {str(e)}") return f"Error getting track info: {str(e)}"
- Core Ableton Live API implementation for retrieving detailed track information, including clip slots and devices. Called by the remote script when receiving 'get_track_info' command.def _get_track_info(self, track_index): """Get information about 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] # Get clip slots clip_slots = [] for slot_index, slot in enumerate(track.clip_slots): clip_info = None if slot.has_clip: clip = slot.clip clip_info = { "name": clip.name, "length": clip.length, "is_playing": clip.is_playing, "is_recording": clip.is_recording } clip_slots.append({ "index": slot_index, "has_clip": slot.has_clip, "clip": clip_info }) # Get devices devices = [] for device_index, device in enumerate(track.devices): devices.append({ "index": device_index, "name": device.name, "class_name": device.class_name, "type": self._get_device_type(device) }) result = { "index": track_index, "name": track.name, "is_audio_track": track.has_audio_input, "is_midi_track": track.has_midi_input, "mute": track.mute, "solo": track.solo, "arm": track.arm, "volume": track.mixer_device.volume.value, "panning": track.mixer_device.panning.value, "clip_slots": clip_slots, "devices": devices } return result except Exception as e: self.log_message("Error getting track info: " + str(e)) raise
- AbletonMCP_Remote_Script/__init__.py:225-227 (registration)Dispatch/registration in remote script's command processor: handles 'get_track_info' command by extracting track_index and calling _get_track_info.elif command_type == "get_track_info": track_index = params.get("track_index", 0) response["result"] = self._get_track_info(track_index)
- MCP_Server/server.py:274-279 (schema)Input schema documentation in the MCP tool docstring, specifying the track_index parameter.""" Get detailed information about a specific track in Ableton. Parameters: - track_index: The index of the track to get information about """