Skip to main content
Glama
seohyunjun

OpenSearch MCP Server

by seohyunjun

get_cluster_health

Retrieve the health status of an OpenSearch cluster using natural language commands to monitor and manage cluster performance effectively.

Instructions

Get cluster health status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_cluster_health' tool. It uses the OpenSearch client to fetch cluster health status and returns it as TextContent.
    @mcp.tool(description="Get cluster health status") async def get_cluster_health() -> list[TextContent]: """ Get health status of the Opensearch cluster. Returns information about the number of nodes, shards, etc. """ self.logger.info("Getting cluster health") try: response = self.es_client.cluster.health() return [TextContent(type="text", text=str(response))] except Exception as e: self.logger.error(f"Error getting cluster health: {e}") return [TextContent(type="text", text=f"Error: {str(e)}")]
  • Registration of the ClusterTools instance, which defines and registers the get_cluster_health tool via its register_tools method.
    cluster_tools.register_tools(self.mcp)

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/seohyunjun/opensearch-mcp-server'

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