get_cluster
Retrieve detailed information about a specific Databricks cluster by providing its cluster ID to monitor configuration, status, and performance.
Instructions
Get information about a specific Databricks cluster
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes |
Implementation Reference
- MCP tool handler for 'get_cluster'. Decorated with @mcp.tool() to register it. Fetches cluster details using the clusters API and returns JSON response or error.@mcp.tool() async def get_cluster(cluster_id: str) -> str: """Get information about a specific Databricks cluster""" logger.info(f"Getting cluster info: {cluster_id}") try: result = await clusters.get_cluster(cluster_id) return json.dumps(result) except Exception as e: logger.error(f"Error getting cluster info: {str(e)}") return json.dumps({"error": str(e)})
- src/api/clusters.py:62-75 (helper)Helper function in clusters API module that makes the actual Databricks API call to retrieve cluster information by ID.async def get_cluster(cluster_id: str) -> Dict[str, Any]: """ Get information about a specific cluster. Args: cluster_id: ID of the cluster Returns: Response containing cluster information Raises: DatabricksAPIError: If the API request fails """ logger.info(f"Getting information for cluster: {cluster_id}")