Skip to main content
Glama
samhavens

Databricks MCP Server

by samhavens

list_notebooks

Retrieve a list of notebooks from a specified workspace directory in Databricks to manage and organize your data projects.

Instructions

List notebooks in a workspace directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Implementation Reference

  • MCP tool handler for the 'list_notebooks' tool. Takes a path parameter, lists notebooks using the notebooks API module, and returns the result as JSON or error message.
    @mcp.tool()
    async def list_notebooks(path: str) -> str:
        """List notebooks in a workspace directory"""
        logger.info(f"Listing notebooks in: {path}")
        try:
            result = await notebooks.list_notebooks(path)
            return json.dumps(result)
        except Exception as e:
            logger.error(f"Error listing notebooks: {str(e)}")
            return json.dumps({"error": str(e)})
  • Helper function that implements the core logic by calling the Databricks Workspace API endpoint /api/2.0/workspace/list to list notebooks or files at the given path.
    async def list_notebooks(path: str) -> Dict[str, Any]:
        """
        List notebooks in a workspace directory.
        
        Args:
            path: The path to list
            
        Returns:
            Response containing the directory listing
            
        Raises:
            DatabricksAPIError: If the API request fails
        """
        logger.info(f"Listing notebooks in path: {path}")
        return make_api_request("GET", "/api/2.0/workspace/list", params={"path": path})
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('List') but lacks details on permissions, rate limits, pagination, output format, or error conditions. For a read operation without annotations, this leaves significant gaps in understanding how the tool behaves beyond its basic function.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by contributing essential information about the tool's function.

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

Completeness2/5

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

Given no annotations, 0% schema coverage, no output schema, and multiple sibling tools, the description is incomplete. It covers the basic purpose but misses critical context like parameter details, behavioral traits, output expectations, and differentiation from similar tools. For a list operation in a complex environment, this leaves too many unanswered questions.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It implies a 'path' parameter contextually ('in a workspace directory') but doesn't explain what the path represents, its format, or valid values. This adds minimal semantic value beyond the bare schema, failing to adequately document the single required parameter.

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 ('List') and resource ('notebooks'), and specifies the scope ('in a workspace directory'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_files' or 'list_volume_files', which prevents a perfect score.

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 minimal guidance by mentioning 'in a workspace directory', but offers no explicit advice on when to use this tool versus alternatives like 'list_files' or 'list_volume_files'. There's no mention of prerequisites, exclusions, or comparative contexts, leaving usage decisions largely to inference.

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/samhavens/databricks-mcp-server'

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