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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/cluster.py:10-12 (handler)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()
- src/clients/common/cluster.py:6-8 (helper)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, ]
- src/tools/cluster.py:8-18 (registration)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()