Skip to main content
Glama
jamesbrink

MCP Server for Coroot

health_check

Verify the Coroot server's operational status and accessibility to ensure monitoring capabilities are available.

Instructions

Check if Coroot server is healthy.

Performs a simple health check to verify that the Coroot server is running and accessible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'health_check' MCP tool. The @mcp.tool() decorator registers this function as an MCP tool with the name 'health_check'. It delegates to the helper implementation.
    @mcp.tool()
    async def health_check() -> dict[str, Any]:
        """Check if Coroot server is healthy.
    
        Performs a simple health check to verify that the Coroot
        server is running and accessible.
        """
        return await health_check_impl()  # type: ignore[no-any-return]
  • Helper implementation that calls the CorootClient's health_check method, handles the response, and formats it for the MCP tool.
    @handle_errors
    async def health_check_impl() -> dict[str, Any]:
        """Check Coroot server health."""
        is_healthy = await get_client().health_check()
        return {
            "success": True,
            "healthy": is_healthy,
            "message": "Coroot server is healthy"
            if is_healthy
            else "Coroot server is not responding",
        }
  • Core implementation in CorootClient that performs the HTTP GET request to the Coroot server's /health endpoint and checks the status code.
    async def health_check(self) -> bool:
        """Check if Coroot server is healthy.
    
        Returns:
            True if healthy, False otherwise.
        """
        try:
            response = await self._request("GET", "/health")
            return response.status_code == 200
        except Exception:
            return False

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/jamesbrink/mcp-coroot'

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