get_browser_tree
Browse and access Ableton Live's sound library to find instruments, samples, and effects for music production. Filter by category type to locate specific audio content.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category_type | No | all |
Implementation Reference
- MCP_Server/server.py:411-452 (handler)The main handler function for the MCP tool 'get_browser_tree'. It is registered via the @mcp.tool() decorator. The function sends a 'get_browser_tree' command to the Ableton Remote Script with the specified category_type, processes the response, and returns a formatted tree representation of the browser contents.@mcp.tool() def get_browser_tree(ctx: Context, category_type: str = "all") -> str: try: ableton = get_ableton_connection() result = ableton.send_command("get_browser_tree", {"category_type": category_type}) if "available_categories" in result and len(result.get("categories", [])) == 0: available_cats = result.get("available_categories", []) return (f"No categories found for '{category_type}'. " f"Available browser categories: {', '.join(available_cats)}") total_folders = result.get("total_folders", 0) formatted_output = f"Browser tree for '{category_type}' (showing {total_folders} folders):\n\n" def format_tree(item, indent=0): output = "" if item: prefix = " " * indent name = item.get("name", "Unknown") path = item.get("path", "") has_more = item.get("has_more", False) output += f"{prefix}• {name}" if path: output += f" (path: {path})" if has_more: output += " [...]" output += "\n" for child in item.get("children", []): output += format_tree(child, indent + 1) return output for category in result.get("categories", []): formatted_output += format_tree(category) + "\n" return formatted_output except Exception as e: error_msg = str(e) if "Browser is not available" in error_msg: logger.error(f"Browser is not available in Ableton: {error_msg}") return f"Error: The Ableton browser is not available. Make sure Ableton Live is fully loaded and try again." elif "Could not access Live application" in error_msg: logger.error(f"Could not access Live application: {error_msg}") return f"Error: Could not access the Ableton Live application. Make sure Ableton Live is running and the Remote Script is loaded." else: logger.error(f"Error getting browser tree: {error_msg}") return f"Error getting browser tree: {error_msg}"