Skip to main content
Glama
JustTryAI

Databricks MCP Server

create_cluster

Provision a new Databricks cluster by specifying name, Spark version, node type, worker count, and auto-termination settings.

Instructions

Create a new Databricks cluster with parameters: cluster_name (required), spark_version (required), node_type_id (required), num_workers, autotermination_minutes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • MCP tool handler for 'create_cluster'. Invokes the core clusters.create_cluster API and formats the response as TextContent for the model.
    async def create_cluster(params: Dict[str, Any]) -> List[TextContent]:
        logger.info(f"Creating cluster with params: {params}")
        try:
            result = await clusters.create_cluster(params)
            return [{"text": json.dumps(result)}]
        except Exception as e:
            logger.error(f"Error creating cluster: {str(e)}")
            return [{"text": json.dumps({"error": str(e)})}]
  • Registers the 'create_cluster' tool in the FastMCP server, specifying the name and description which outlines the expected input parameters (serving as schema).
    @self.tool(
        name="create_cluster",
        description="Create a new Databricks cluster with parameters: cluster_name (required), spark_version (required), node_type_id (required), num_workers, autotermination_minutes",
    )
  • Core helper function that performs the actual Databricks API call to create a cluster using make_api_request.
    async def create_cluster(cluster_config: Dict[str, Any]) -> Dict[str, Any]:
        """
        Create a new Databricks cluster.
        
        Args:
            cluster_config: Cluster configuration
            
        Returns:
            Response containing the cluster ID
            
        Raises:
            DatabricksAPIError: If the API request fails
        """
        logger.info("Creating new cluster")
        return make_api_request("POST", "/api/2.0/clusters/create", data=cluster_config)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool creates a cluster but doesn't describe what happens after creation (e.g., whether it starts automatically, costs involved, time to provision, or error handling). For a mutation tool with zero annotation coverage, this leaves critical behavioral traits unspecified.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core action and lists parameters without unnecessary details. It avoids redundancy and wastes no words, though it could benefit from slight structuring (e.g., separating parameter explanations) for better readability.

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 the complexity of creating a Databricks cluster (a mutation operation with no annotations, no output schema, and a nested input schema with 0% coverage), the description is incomplete. It lacks information on behavioral outcomes, error cases, return values, and how it fits with sibling tools, making it insufficient for safe and effective use by an AI agent.

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?

The input schema has 0% description coverage and uses a generic 'params' object, so the description must compensate. It lists specific parameters (cluster_name, spark_version, etc.) and marks some as required, adding meaningful semantics beyond the schema. However, it doesn't explain what these parameters mean (e.g., what 'spark_version' entails or how 'num_workers' affects the cluster), leaving gaps in understanding.

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 action ('Create a new Databricks cluster') and resource ('Databricks cluster'), making the purpose unambiguous. However, it doesn't explicitly differentiate this tool from sibling tools like 'start_cluster' or 'get_cluster', which would require more specific context about when to create versus start an existing cluster.

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 prerequisites (e.g., needing permissions or a workspace setup), compare it to siblings like 'start_cluster' (for existing clusters) or 'run_job' (which might involve clusters), or specify scenarios where creation is appropriate versus other operations.

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