Skip to main content
Glama

get_cluster_health_and_services

Monitor Couchbase cluster health by checking service status, connection details, and latency measurements to ensure operational reliability.

Instructions

Get cluster health status and list of all running services.

This tool provides health monitoring by: - Getting health status of all running services with latency information (via ping) - Listing all services running on the cluster with their endpoints - Showing connection status and node information for each service If bucket_name is provided, it actively pings services from the perspective of the bucket. Otherwise, it uses cluster-level ping to get the health status of the cluster. Returns: - Cluster health status with service-level connection details and latency measurements

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_nameNo

Implementation Reference

  • The handler function that executes the tool logic. It connects to the cluster (and optionally a bucket), performs a ping operation to retrieve health status and services information, and returns the result in JSON format.
    def get_cluster_health_and_services( ctx: Context, bucket_name: str | None = None ) -> dict[str, Any]: """Get cluster health status and list of all running services. This tool provides health monitoring by: - Getting health status of all running services with latency information (via ping) - Listing all services running on the cluster with their endpoints - Showing connection status and node information for each service If bucket_name is provided, it actively pings services from the perspective of the bucket. Otherwise, it uses cluster-level ping to get the health status of the cluster. Returns: - Cluster health status with service-level connection details and latency measurements """ try: cluster = get_cluster_connection(ctx) if bucket_name: # Ping services from the perspective of the bucket bucket = connect_to_bucket(cluster, bucket_name) result = bucket.ping().as_json() else: # Ping services from the perspective of the cluster result = cluster.ping().as_json() return { "status": "success", "data": json.loads(result), } except Exception as e: logger.error(f"Error getting cluster health: {e}") return { "status": "error", "error": str(e), "message": "Failed to get cluster health and services information", }
  • The registration code that adds the get_cluster_health_and_services tool (as part of ALL_TOOLS) to the FastMCP server instance.
    # Register all tools for tool in ALL_TOOLS: mcp.add_tool(tool)
  • The get_cluster_health_and_services function is included in the ALL_TOOLS list, which is used for bulk registration of all tools.
    get_cluster_health_and_services,
  • Import of the get_cluster_health_and_services handler from the server module into the tools package.
    get_cluster_health_and_services,

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/Couchbase-Ecosystem/mcp-server-couchbase'

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