Skip to main content
Glama
ChrisChoTW

databricks-mcp

by ChrisChoTW

list_clusters

Retrieve and display Databricks clusters for monitoring and management, enabling users to view cluster metrics and configurations.

Instructions

List Clusters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `list_clusters` tool is defined in `tools/compute.py`. It uses `mcp.tool` for registration and `get_workspace_client` to retrieve cluster data from the Databricks SDK. It then formats the response into a list of dictionaries.
    @mcp.tool
    def list_clusters(ctx: Context, limit: int = 20) -> List[Dict[str, Any]]:
        """List Clusters"""
        w = get_workspace_client()
        clusters = w.clusters.list()
        results = []
        for i, c in enumerate(clusters):
            if i >= limit:
                break
            c_d = c.as_dict()
            results.append({
                "cluster_id": c_d.get("cluster_id"),
                "cluster_name": c_d.get("cluster_name"),
                "state": c_d.get("state"),
                "driver_node_type_id": c_d.get("driver_node_type_id"),
                "spark_version": c_d.get("spark_version")
            })
        return results
Behavior1/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 but provides none. 'List Clusters' doesn't indicate whether this is a read-only operation, whether it requires authentication, what the rate limits might be, whether results are paginated, or what format the output takes. The description is completely silent on all behavioral aspects that an agent would need to know.

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 maximally concise at just two words. While this represents severe under-specification, from a pure conciseness perspective, there's zero wasted language. Every word (both of them) directly contributes to stating the tool's basic function. The structure is as simple as possible.

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 that this is a listing tool with one simple parameter and an output schema exists, the description could be minimal but still informative. However, 'List Clusters' provides insufficient context for an agent to understand what clusters are being listed, what system they belong to, or how this tool relates to the many sibling tools. The existence of an output schema helps, but the description doesn't even hint at what kind of data will be returned.

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

Parameters3/5

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

The description mentions no parameters at all, while the input schema has one parameter ('limit') with 0% schema description coverage. Since there's only one parameter and the description doesn't address it, this meets the baseline expectation. The schema provides the parameter structure, but the description adds no semantic context about what 'limit' means or how it affects the listing operation.

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

Purpose2/5

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

The description 'List Clusters' is a tautology that merely restates the tool name without adding any meaningful context. It doesn't specify what type of clusters, what system they belong to, or what specific action 'list' entails. While it matches the sibling tool naming pattern (e.g., 'list_catalogs', 'list_tables'), it fails to distinguish itself or provide purpose beyond the obvious.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance on when to use this tool versus alternatives. With multiple sibling tools like 'get_cluster_events', 'get_cluster_metrics', and 'list_warehouses', there's no indication whether this is the primary way to retrieve cluster information or when other tools might be more appropriate. No context about prerequisites, timing, or relationships is mentioned.

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

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