Skip to main content
Glama

get_browser_items_at_path

Retrieve Ableton browser items from a specific category and folder path to access sounds, instruments, and effects for music production.

Instructions

Get browser items at a specific path in Ableton's browser.

Parameters:

  • path: Path in the format "category/folder/subfolder" where category is one of the available browser categories in Ableton

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Implementation Reference

  • The primary MCP tool handler for 'get_browser_items_at_path'. It connects to the Ableton remote script, sends the command with the path parameter, handles the response, and returns JSON-formatted items or formatted error messages.
    @mcp.tool()
    def get_browser_items_at_path(ctx: Context, path: str) -> str:
        """
        Get browser items at a specific path in Ableton's browser.
        
        Parameters:
        - path: Path in the format "category/folder/subfolder"
                where category is one of the available browser categories in Ableton
        """
        try:
            ableton = get_ableton_connection()
            result = ableton.send_command("get_browser_items_at_path", {
                "path": path
            })
            
            # Check if there was an error with available categories
            if "error" in result and "available_categories" in result:
                error = result.get("error", "")
                available_cats = result.get("available_categories", [])
                return (f"Error: {error}\n"
                       f"Available browser categories: {', '.join(available_cats)}")
            
            return json.dumps(result, indent=2)
        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."
            elif "Unknown or unavailable category" in error_msg:
                logger.error(f"Invalid browser category: {error_msg}")
                return f"Error: {error_msg}. Please check the available categories using get_browser_tree."
            elif "Path part" in error_msg and "not found" in error_msg:
                logger.error(f"Path not found: {error_msg}")
                return f"Error: {error_msg}. Please check the path and try again."
            else:
                logger.error(f"Error getting browser items at path: {error_msg}")
                return f"Error getting browser items at path: {error_msg}"
  • The core helper function in the Ableton Live remote script that implements the browser navigation logic. It accesses Ableton's browser object, resolves the path by traversing categories and folders, collects item details (name, is_folder, is_device, is_loadable, uri), and returns structured data or errors.
    def get_browser_items_at_path(self, path):
        """
        Get browser items at a specific path.
        
        Args:
            path: Path in the format "category/folder/subfolder"
                 where category is one of: instruments, sounds, drums, audio_effects, midi_effects
                 or any other available browser category
                 
        Returns:
            Dictionary with items at the specified path
        """
        try:
            # Access the application's browser instance instead of creating a new one
            app = self.application()
            if not app:
                raise RuntimeError("Could not access Live application")
                
            # Check if browser is available
            if not hasattr(app, 'browser') or app.browser is None:
                raise RuntimeError("Browser is not available in the Live application")
            
            # Log available browser attributes to help diagnose issues
            browser_attrs = [attr for attr in dir(app.browser) if not attr.startswith('_')]
            self.log_message("Available browser attributes: {0}".format(browser_attrs))
                
            # Parse the path
            path_parts = path.split("/")
            if not path_parts:
                raise ValueError("Invalid path")
            
            # Determine the root category
            root_category = path_parts[0].lower()
            current_item = None
            
            # Check standard categories first
            if root_category == "instruments" and hasattr(app.browser, 'instruments'):
                current_item = app.browser.instruments
            elif root_category == "sounds" and hasattr(app.browser, 'sounds'):
                current_item = app.browser.sounds
            elif root_category == "drums" and hasattr(app.browser, 'drums'):
                current_item = app.browser.drums
            elif root_category == "audio_effects" and hasattr(app.browser, 'audio_effects'):
                current_item = app.browser.audio_effects
            elif root_category == "midi_effects" and hasattr(app.browser, 'midi_effects'):
                current_item = app.browser.midi_effects
            else:
                # Try to find the category in other browser attributes
                found = False
                for attr in browser_attrs:
                    if attr.lower() == root_category:
                        try:
                            current_item = getattr(app.browser, attr)
                            found = True
                            break
                        except Exception as e:
                            self.log_message("Error accessing browser attribute {0}: {1}".format(attr, str(e)))
                
                if not found:
                    # If we still haven't found the category, return available categories
                    return {
                        "path": path,
                        "error": "Unknown or unavailable category: {0}".format(root_category),
                        "available_categories": browser_attrs,
                        "items": []
                    }
            
            # Navigate through the path
            for i in range(1, len(path_parts)):
                part = path_parts[i]
                if not part:  # Skip empty parts
                    continue
                
                if not hasattr(current_item, 'children'):
                    return {
                        "path": path,
                        "error": "Item at '{0}' has no children".format('/'.join(path_parts[:i])),
                        "items": []
                    }
                
                found = False
                for child in current_item.children:
                    if hasattr(child, 'name') and child.name.lower() == part.lower():
                        current_item = child
                        found = True
                        break
                
                if not found:
                    return {
                        "path": path,
                        "error": "Path part '{0}' not found".format(part),
                        "items": []
                    }
            
            # Get items at the current path
            items = []
            if hasattr(current_item, 'children'):
                for child in current_item.children:
                    item_info = {
                        "name": child.name if hasattr(child, 'name') else "Unknown",
                        "is_folder": hasattr(child, 'children') and bool(child.children),
                        "is_device": hasattr(child, 'is_device') and child.is_device,
                        "is_loadable": hasattr(child, 'is_loadable') and child.is_loadable,
                        "uri": child.uri if hasattr(child, 'uri') else None
                    }
                    items.append(item_info)
            
            result = {
                "path": path,
                "name": current_item.name if hasattr(current_item, 'name') else "Unknown",
                "uri": current_item.uri if hasattr(current_item, 'uri') else None,
                "is_folder": hasattr(current_item, 'children') and bool(current_item.children),
                "is_device": hasattr(current_item, 'is_device') and current_item.is_device,
                "is_loadable": hasattr(current_item, 'is_loadable') and current_item.is_loadable,
                "items": items
            }
            
            self.log_message("Retrieved {0} items at path: {1}".format(len(items), path))
            return result
            
        except Exception as e:
            self.log_message("Error getting browser items at path: {0}".format(str(e)))
            self.log_message(traceback.format_exc())
            raise
  • The @mcp.tool() decorator registers the get_browser_items_at_path function as an MCP tool, with schema inferred from the function signature (path: str) and docstring.
    @mcp.tool()
  • Docstring defining the input schema: path parameter as a string in 'category/folder/subfolder' format.
    """
    Get browser items at a specific path in Ableton's browser.
    
    Parameters:
    - path: Path in the format "category/folder/subfolder"
            where category is one of the available browser categories in Ableton
    """
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes a read operation ('Get'), implying it's likely non-destructive, but doesn't specify permissions required, rate limits, error handling, or what the return format looks like (e.g., list of items, their types, or metadata). For a tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences: one stating the purpose and another detailing the parameter. It's front-loaded with the core function and avoids unnecessary fluff, making it efficient. However, the parameter explanation could be slightly more structured (e.g., bullet points or examples) for optimal clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is minimally adequate. It covers the purpose and parameter semantics but lacks usage guidelines, behavioral details (like return format or error cases), and differentiation from siblings. This leaves gaps that could hinder an agent's ability to use the tool effectively in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful context beyond the input schema, which has 0% description coverage. It explains the 'path' parameter format as 'category/folder/subfolder' and notes that categories are from Ableton's browser, clarifying the expected input structure. This compensates well for the lack of schema descriptions, though it doesn't detail specific categories or examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'browser items at a specific path in Ableton's browser', making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_browser_tree' (which might list the entire browser structure) or 'get_session_info' (which might provide session-level information), leaving some ambiguity about when to choose this specific tool over alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_browser_tree' (which could be for browsing the entire tree) or 'get_session_info' (for session-level data), nor does it specify prerequisites or contexts for usage. This leaves the agent without clear direction on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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