Skip to main content
Glama
samhavens

Databricks MCP Server

by samhavens

get_cluster

Retrieve detailed information about a Databricks cluster by providing its cluster ID, enabling efficient management and monitoring through the Databricks MCP Server.

Instructions

Get information about a specific Databricks cluster

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cluster_idYes

Implementation Reference

  • MCP tool handler for 'get_cluster'. Decorated with @mcp.tool() to register it. Calls clusters.get_cluster() API wrapper and returns JSON response.
    @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)})
  • API wrapper function get_cluster that performs 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}") return make_api_request("GET", "/api/2.0/clusters/get", params={"cluster_id": cluster_id})
  • The @mcp.tool() decorator registers the get_cluster function as an MCP tool.
    @mcp.tool()

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/samhavens/databricks-mcp-server'

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