Skip to main content
Glama
Pranav-Karra-3301

CATA Bus MCP Server

list_routes_tool

Retrieve all available bus routes with their ID, name, and color information from the CATA Bus system.

Instructions

List all available bus routes.

Returns a list of routes with their ID, short name, long name, and color.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for list_routes_tool, decorated with @mcp.tool for registration and execution. Ensures data initialization and delegates to the list_routes helper.
    @mcp.tool
    async def list_routes_tool() -> list[dict[str, Any]]:
        """List all available bus routes.
    
        Returns a list of routes with their ID, short name, long name, and color.
        """
        await ensure_initialized()
        if not gtfs_data or not gtfs_data.routes:
            return []
        return await list_routes(gtfs_data)
  • Core helper function that extracts and formats route data from GTFSData, including sorting by short name.
    async def list_routes(gtfs_data: GTFSData) -> list[dict[str, Any]]:
        """
        List all available bus routes.
    
        Returns:
            List of route information with id, short name, long name, and color.
        """
        routes = []
        for route_id, route in gtfs_data.routes.items():
            routes.append(
                {
                    "route_id": route.route_id,
                    "short_name": route.route_short_name,
                    "long_name": route.route_long_name,
                    "color": f"#{route.route_color}" if route.route_color else None,
                }
            )
    
        # Sort by short name for consistency (use empty string for None)
        routes.sort(key=lambda x: x.get("short_name") or "")
        return routes
Behavior3/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 discloses the return format ('list of routes with their ID, short name, long name, and color'), which is useful behavioral context. However, it doesn't mention potential limitations like pagination, rate limits, or data freshness, which are important for a list operation.

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 extremely concise and well-structured: two sentences that directly state the purpose and return format without any fluff. Every word earns its place, making it easy for an agent to parse quickly.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, output schema exists), the description is reasonably complete. It explains what the tool does and what it returns, which is sufficient for basic understanding. However, it could improve by addressing behavioral aspects like data scope or limitations, slightly reducing completeness.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately avoids discussing parameters, earning a high baseline score for not adding unnecessary information.

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's purpose: 'List all available bus routes.' It specifies the verb ('List') and resource ('bus routes'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search_stops_tool' or 'vehicle_positions_tool', which prevents a perfect score.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for usage, or comparisons to siblings like 'search_stops_tool' for filtered results. This lack of usage context leaves the agent without clear direction.

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