Skip to main content
Glama

get_track_info

Retrieve detailed track information from Ableton Live using a track index. Ideal for AI-assisted music production workflows with Claude AI integration.

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
NameRequiredDescriptionDefault
track_indexYes

Implementation Reference

  • MCP tool handler for 'get_track_info'. Proxies the request to the Ableton remote script via socket connection and returns formatted JSON result.
    @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)}"
  • Actual implementation of track info retrieval in the Ableton Live remote script, accessing Live API to fetch track details, clip slots, and devices.
    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
  • FastMCP tool registration decorator for the get_track_info handler.
    @mcp.tool()
  • Dispatch handler in remote script that routes 'get_track_info' command to the _get_track_info method.
    elif command_type == "get_track_info": track_index = params.get("track_index", 0) response["result"] = self._get_track_info(track_index) # Commands that modify Live's state should be scheduled on the main thread

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/ahujasid/ableton-mcp'

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