Skip to main content
Glama

get_cluster

Retrieve detailed information about a Databricks cluster using its cluster_id, enabling efficient management and monitoring within the Databricks MCP Server environment.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • MCP tool handler for 'get_cluster'. Extracts cluster_id from input params and delegates to the clusters.get_cluster API function, returning JSON response or error.
    @self.tool( name="get_cluster", description="Get information about a specific Databricks cluster with parameter: cluster_id (required)", ) 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 performs the actual Databricks API GET request to retrieve details for the specified 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})

Other Tools

Related Tools

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