Skip to main content
Glama

health_check

Verify CATA Bus MCP Server connectivity and operational status to ensure reliable access to real-time bus tracking, arrival predictions, and service alerts.

Instructions

Ultra-fast health check optimized for cloud pre-flight validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'health_check' tool. It returns a dictionary with server health status, distinguishing between cloud and local environments. The @mcp.tool decorator registers it as an MCP tool.
    @mcp.tool async def health_check() -> Dict[str, Any]: """Ultra-fast health check optimized for cloud pre-flight validation.""" is_cloud = _is_cloud_environment() # For cloud pre-flight: return immediately without any data loading if is_cloud: return { "status": "healthy", "server": "catabus-mcp", "version": "0.1.0", "environment": "cloud", "startup_mode": "optimized", "server_time": datetime.now(timezone.utc).isoformat(), "pre_flight": "ready" } # For local development: provide more detailed status return { "status": "healthy", "initialized": initialized, "routes_loaded": len(gtfs_data.routes) if gtfs_data else 0, "stops_loaded": len(gtfs_data.stops) if gtfs_data else 0, "last_static_update": gtfs_data.last_updated.isoformat() if gtfs_data and gtfs_data.last_updated else None, "last_vehicle_update": realtime_poller.data.last_vehicle_update.isoformat() if realtime_poller.data.last_vehicle_update else None, "last_trip_update": realtime_poller.data.last_trip_update.isoformat() if realtime_poller.data.last_trip_update else None, "server_time": datetime.now(timezone.utc).isoformat(), "environment": "local", "startup_mode": "lazy_loading" }

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/Pranav-Karra-3301/catabus-mcp'

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