start_cluster
Activate a terminated Databricks cluster by specifying its unique cluster ID, enabling seamless resumption of data processing and analytics tasks.
Instructions
Start a terminated Databricks cluster
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes |
Implementation Reference
- MCP tool handler for 'start_cluster': registers the tool using @mcp.tool() and implements the logic by calling the clusters API, handling errors, and returning JSON.@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)})
- src/api/clusters.py:79-93 (helper)Core implementation of cluster start: makes POST request to Databricks Clusters API /api/2.0/clusters/start with cluster_id.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})