Skip to main content
Glama

get_cluster

Retrieve detailed information about a specific Databricks cluster by providing its cluster ID to access configuration, status, and resource details.

Instructions

Get information about a specific Databricks cluster with parameter: cluster_id (required)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • Registration of the 'get_cluster' MCP tool with description specifying the required cluster_id parameter.
    @self.tool( name="get_cluster", description="Get information about a specific Databricks cluster with parameter: cluster_id (required)", )
  • Handler function for the 'get_cluster' tool that extracts cluster_id from params, calls the clusters.get_cluster API, and returns JSON response or error.
    async def get_cluster(params: Dict[str, Any]) -> List[TextContent]: logger.info(f"Getting cluster info with params: {params}") try: result = await clusters.get_cluster(params.get("cluster_id")) return [{"text": json.dumps(result)}] except Exception as e: logger.error(f"Error getting cluster info: {str(e)}") return [{"text": json.dumps({"error": str(e)})}]
  • Core API helper function that makes the Databricks GET request to /api/2.0/clusters/get with cluster_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}") return make_api_request("GET", "/api/2.0/clusters/get", params={"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/JustTryAI/databricks-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server