start_cluster
Initiate the restart of a terminated Databricks cluster by specifying the required cluster_id parameter, enabling efficient resource management and workflow continuity.
Instructions
Start a terminated Databricks cluster with parameter: cluster_id (required)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- MCP tool handler for 'start_cluster'. Registers the tool and implements the logic by calling the core clusters.start_cluster function, handling errors and formatting response as TextContent.@self.tool( name="start_cluster", description="Start a terminated Databricks cluster with parameter: cluster_id (required)", ) async def start_cluster(params: Dict[str, Any]) -> List[TextContent]: logger.info(f"Starting cluster with params: {params}") try: result = await clusters.start_cluster(params.get("cluster_id")) return [{"text": json.dumps(result)}] except Exception as e: logger.error(f"Error starting cluster: {str(e)}") return [{"text": json.dumps({"error": str(e)})}]
- src/api/clusters.py:79-93 (helper)Core helper function that performs the actual Databricks API call 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})
- src/server/databricks_mcp_server.py:102-105 (registration)Explicit registration of the 'start_cluster' tool in the MCP server using the @self.tool decorator.@self.tool( name="start_cluster", description="Start a terminated Databricks cluster with parameter: cluster_id (required)", )