get_session_info
Retrieve current Ableton Live session details including tracks, instruments, clips, and arrangement data to understand project structure and content.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- MCP_Server/server.py:253-262 (handler)Primary MCP tool handler for 'get_session_info'. Connects to Ableton via socket, sends the command, and returns formatted JSON response.@mcp.tool() def get_session_info(ctx: Context) -> str: try: ableton = get_ableton_connection() result = ableton.send_command("get_session_info") return json.dumps(result, indent=2) except Exception as e: logger.error(f"Error getting session info: {str(e)}") return f"Error getting session info: {str(e)}"
- Underlying implementation in Ableton remote script that fetches session info from Live API (tempo, time signature, tracks, master track details).def _get_session_info(self): """Get information about the current session""" try: result = { "tempo": self._song.tempo, "signature_numerator": self._song.signature_numerator, "signature_denominator": self._song.signature_denominator, "track_count": len(self._song.tracks), "return_track_count": len(self._song.return_tracks), "master_track": { "name": "Master", "volume": self._song.master_track.mixer_device.volume.value, "panning": self._song.master_track.mixer_device.panning.value } } return result except Exception as e: self.log_message("Error getting session info: " + str(e)) raise
- MCP_Server/server.py:225-227 (registration)Usage of 'get_session_info' command in connection validation within get_ableton_connection helper._ableton_connection.send_command("get_session_info") logger.info("Connection validated successfully") return _ableton_connection
- Dispatch/registration point in remote script _process_command that routes 'get_session_info' to the handler.if command_type == "get_session_info": response["result"] = self._get_session_info()