Skip to main content
Glama
Pranav-Karra-3301

CATA Bus MCP Server

health_check

Validate system status for the CATA Bus MCP Server 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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The health_check tool handler function, decorated with @mcp.tool for registration. It returns server status information, optimized for cloud environments with immediate response and detailed stats for local use.
    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(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(UTC).isoformat(),
            "environment": "local",
            "startup_mode": "lazy_loading",
        }
  • Registration of the health_check tool via FastMCP @mcp.tool decorator.
    async def health_check() -> dict[str, Any]:
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'ultra-fast' and 'optimized for cloud pre-flight validation,' which gives some behavioral context, but lacks details on permissions, rate limits, error handling, or what the health check entails. This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads key information ('Ultra-fast health check') without unnecessary words. Every part earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 0 parameters, 100% schema coverage, and an output schema exists, the description is minimally adequate. However, for a health check tool with no annotations, it should provide more context on what is checked, success criteria, or typical use cases to be fully complete, especially compared to siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not add parameter details, which is appropriate, but it could have mentioned if any implicit inputs are required. Baseline is 4 for zero parameters, as the schema fully covers the absence of inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs a 'health check' with the specific purpose of 'cloud pre-flight validation' and mentions it's 'ultra-fast.' This provides a clear verb ('health check') and context, though it doesn't explicitly differentiate from sibling tools like 'initialize_data' or 'list_routes_tool,' which prevents a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for 'cloud pre-flight validation' but does not specify when to use this tool versus alternatives like 'initialize_data' or other siblings. There is no explicit guidance on prerequisites, timing, or exclusions, leaving the agent with minimal context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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