Skip to main content
Glama

list_notebooks

Enumerate notebooks within a specified workspace directory using the 'path' parameter to streamline resource management on Databricks MCP Server.

Instructions

List notebooks in a workspace directory with parameter: path (required)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • MCP tool handler and registration for 'list_notebooks'. Calls the notebooks API and formats the response as MCP TextContent.
    @self.tool( name="list_notebooks", description="List notebooks in a workspace directory with parameter: path (required)", ) async def list_notebooks(params: Dict[str, Any]) -> List[TextContent]: logger.info(f"Listing notebooks with params: {params}") try: result = await notebooks.list_notebooks(params.get("path")) return [{"text": json.dumps(result)}] except Exception as e: logger.error(f"Error listing notebooks: {str(e)}") return [{"text": json.dumps({"error": str(e)})}]
  • Underlying API helper function that performs the actual Databricks API request to list workspace items.
    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})

Other Tools

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

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