Skip to main content
Glama
cr7258

Elasticsearch MCP Server

get_cluster_health

Check the health status of an Elasticsearch cluster to ensure optimal performance and availability using this tool.

Instructions

Returns basic information about the health of the cluster.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler function for 'get_cluster_health'. It delegates the call to the search client's get_cluster_health method.
    def get_cluster_health() -> Dict: """Returns basic information about the health of the cluster.""" return self.search_client.get_cluster_health()
  • The underlying client method that performs the actual cluster health query using the OpenSearch client.
    def get_cluster_health(self) -> Dict: """Get cluster health information from OpenSearch.""" return self.client.cluster.health()
  • src/server.py:44-51 (registration)
    ClusterTools class (containing get_cluster_health tool) is registered here as part of the MCP server's tool_classes list, which triggers its register_tools method.
    tool_classes = [ IndexTools, DocumentTools, ClusterTools, AliasTools, DataStreamTools, GeneralTools, ]
  • The register_tools method in ClusterTools where the get_cluster_health tool is decorated with @mcp.tool() for MCP registration.
    def register_tools(self, mcp: FastMCP): @mcp.tool() def get_cluster_health() -> Dict: """Returns basic information about the health of the cluster.""" return self.search_client.get_cluster_health() @mcp.tool() def get_cluster_stats() -> Dict: """Returns high-level overview of cluster statistics.""" return self.search_client.get_cluster_stats()

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/cr7258/elasticsearch-mcp-server'

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