get_cluster_health
Check Elasticsearch cluster health status to monitor node availability, shard distribution, and overall system performance for proactive maintenance.
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' that delegates 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 ClusterClient helper method that calls the underlying OpenSearch/Elasticsearch client API to retrieve cluster health information.def get_cluster_health(self) -> Dict: """Get cluster health information from OpenSearch.""" return self.client.cluster.health()
- src/tools/cluster.py:9-12 (registration)The registration of the tool via @mcp.tool() decorator within the ClusterTools.register_tools method.@mcp.tool() def get_cluster_health() -> Dict: """Returns basic information about the health of the cluster.""" return self.search_client.get_cluster_health()