Skip to main content
Glama
samhavens

Databricks MCP Server

by samhavens

start_cluster

Start a terminated Databricks cluster by providing its cluster ID to resume data processing and analytics workflows.

Instructions

Start a terminated Databricks cluster

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cluster_idYes

Implementation Reference

  • MCP tool handler for start_cluster that wraps the core API call, handles errors, and returns JSON response.
    @mcp.tool()
    async def start_cluster(cluster_id: str) -> str:
        """Start a terminated Databricks cluster"""
        logger.info(f"Starting cluster: {cluster_id}")
        try:
            result = await clusters.start_cluster(cluster_id)
            return json.dumps(result)
        except Exception as e:
            logger.error(f"Error starting cluster: {str(e)}")
            return json.dumps({"error": str(e)})
  • Core implementation that performs the actual Databricks API request to start the cluster.
    async def start_cluster(cluster_id: str) -> Dict[str, Any]:
        """
        Start a terminated Databricks cluster.
        
        Args:
            cluster_id: ID of the cluster to start
            
        Returns:
            Empty response on success
            
        Raises:
            DatabricksAPIError: If the API request fails
        """
        logger.info(f"Starting cluster: {cluster_id}")
        return make_api_request("POST", "/api/2.0/clusters/start", data={"cluster_id": cluster_id})

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