Skip to main content
Glama
samhavens

Databricks MCP Server

by samhavens

list_clusters

Retrieve a detailed list of all Databricks clusters for efficient management and monitoring using natural language commands.

Instructions

List all Databricks clusters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'list_clusters'. Decorated with @mcp.tool() which handles registration and schema generation from types/docstring. Delegates to clusters.list_clusters() API wrapper and returns JSON.
    @mcp.tool() async def list_clusters() -> str: """List all Databricks clusters""" logger.info("Listing clusters") try: result = await clusters.list_clusters() return json.dumps(result) except Exception as e: logger.error(f"Error listing clusters: {str(e)}") return json.dumps({"error": str(e)})
  • Core helper function implementing the Databricks Clusters API list call via make_api_request to /api/2.0/clusters/list.
    async def list_clusters() -> Dict[str, Any]: """ List all Databricks clusters. Returns: Response containing a list of clusters Raises: DatabricksAPIError: If the API request fails """ logger.info("Listing all clusters") return make_api_request("GET", "/api/2.0/clusters/list")

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