health_check
Verify the health and accessibility of the Coroot server. This tool performs a simple check to ensure the server is running and operational for monitoring and observability purposes.
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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_coroot/server.py:1762-1772 (handler)The core handler function that performs the MCP 'health_check' tool logic by invoking the CorootClient's health_check method and formatting the response.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", }
- src/mcp_coroot/server.py:1774-1781 (registration)The registration of the 'health_check' MCP tool using the @mcp.tool() decorator from FastMCP.@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]
- src/mcp_coroot/client.py:1488-1498 (helper)The CorootClient helper method that executes the actual HTTP health check request to the Coroot server's /health endpoint.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