Skip to main content
Glama
JustTryAI

Databricks MCP Server

list_clusters

Retrieve and display all active Databricks clusters to manage compute resources and monitor cluster status.

Instructions

List all Databricks clusters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • MCP tool handler for 'list_clusters': registers the tool and implements the logic by calling the clusters.list_clusters API wrapper and formatting the JSON response.
    @self.tool(
        name="list_clusters",
        description="List all Databricks clusters",
    )
    async def list_clusters(params: Dict[str, Any]) -> List[TextContent]:
        logger.info(f"Listing clusters with params: {params}")
        try:
            result = await clusters.list_clusters()
            return [{"text": json.dumps(result)}]
        except Exception as e:
            logger.error(f"Error listing clusters: {str(e)}")
            return [{"text": json.dumps({"error": str(e)})}]
  • Core API wrapper function that performs the actual Databricks API GET request to /api/2.0/clusters/list to retrieve the list of clusters.
    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")
  • Tool registration via @self.tool decorator specifying name 'list_clusters' and description.
    @self.tool(
        name="list_clusters",
        description="List all Databricks clusters",
    )
    async def list_clusters(params: Dict[str, Any]) -> List[TextContent]:
        logger.info(f"Listing clusters with params: {params}")
        try:
            result = await clusters.list_clusters()
            return [{"text": json.dumps(result)}]
        except Exception as e:
            logger.error(f"Error listing clusters: {str(e)}")
            return [{"text": json.dumps({"error": str(e)})}]
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but provides none. It doesn't indicate whether this is a read-only operation, what permissions are required, whether there are rate limits, pagination behavior, or what the return format looks like. For a tool with zero annotation coverage, this is completely inadequate.

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 extremely concise - a single sentence with no wasted words. It's front-loaded with the core purpose. While it's too brief to be helpful, it earns full marks for conciseness as every word serves a purpose.

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

Completeness1/5

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

Given the complexity (listing clusters in Databricks), lack of annotations, no output schema, and 0% parameter coverage, the description is completely inadequate. It doesn't explain what information is returned, how results are structured, whether there are limitations, or any operational context needed to use the tool effectively.

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

Parameters1/5

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

The input schema has 1 parameter with 0% description coverage, and the tool description provides absolutely no information about parameters. The description doesn't mention what 'params' should contain, what filtering options are available, or any parameter semantics. With low schema coverage and no compensation in the description, this is a critical gap.

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 ('all Databricks clusters'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_cluster' (which presumably retrieves a single cluster) or 'list_jobs'/'list_notebooks' (which list different resource types).

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 when to use 'list_clusters' versus 'get_cluster' (for retrieving a single cluster) or other listing tools like 'list_jobs'. There's no information about prerequisites, context, or exclusions.

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

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