get_cluster_stats
Retrieve high-level cluster statistics to monitor Elasticsearch cluster health, performance metrics, and resource utilization for operational insights.
Instructions
Returns high-level overview of cluster statistics.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/cluster.py:14-17 (handler)The MCP tool handler function for 'get_cluster_stats', registered via @mcp.tool() decorator, which delegates the call to the search client's get_cluster_stats method.@mcp.tool() def get_cluster_stats() -> Dict: """Returns high-level overview of cluster statistics.""" return self.search_client.get_cluster_stats()
- src/clients/common/cluster.py:10-12 (helper)The core helper method in ClusterClient that retrieves cluster statistics directly from the OpenSearch client.def get_cluster_stats(self) -> Dict: """Get cluster statistics from OpenSearch.""" return self.client.cluster.stats()