Skip to main content
Glama
cr7258

Elasticsearch MCP Server

get_cluster_stats

Retrieve a high-level overview of Elasticsearch cluster statistics to monitor health, performance, and resource usage for effective cluster management.

Instructions

Returns high-level overview of cluster statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for get_cluster_stats. This function is decorated with @mcp.tool() and delegates the execution 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()
  • The supporting helper method in ClusterClient that performs the actual call to the OpenSearch client's cluster.stats() method to retrieve cluster statistics.
    def get_cluster_stats(self) -> Dict: """Get cluster statistics from OpenSearch.""" return self.client.cluster.stats()
  • The register_tools method in ClusterTools where the get_cluster_stats tool (among others) is registered with the FastMCP instance using the @mcp.tool() decorator.
    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