Skip to main content
Glama
mirodn

mcp-server-public-transport

be_get_departures

Retrieve real-time train departure information for Belgian stations to plan journeys and check schedules.

Instructions

Get live departure board for a Belgian train station.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stationYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function implementing the core logic for the be_get_departures tool, fetching live train departures from a Belgian station using the iRail API.
    async def be_get_departures(station: str, limit: Optional[int] = 10) -> Dict[str, Any]:
        if not station or not station.strip():
            raise ValueError("Station name must be provided for departures lookup")
    
        params = {
            "station": station.strip(),
            "limit": limit or 10,
            "format": "json"
        }
    
        try:
            logger.info(f"Fetching departures for station: {station.strip()}")
            return await fetch_json(f"{BE_BASE_URL}/liveboard/", params)
        except TransportAPIError as e:
            logger.error(f"Belgium liveboard fetch failed: {e}", exc_info=True)
            raise
  • tools/be.py:69-72 (registration)
    The @mcp.tool decorator that registers the be_get_departures tool with the MCP server, specifying its name and description.
    @mcp.tool(
        name="be_get_departures",
        description="Get live departure board for a Belgian train station."
    )
  • server.py:51-51 (registration)
    Call to register_be_tools(mcp) in the main server, which triggers the registration of all BE tools including be_get_departures.
    be_tools = register_be_tools(mcp)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'live departure board,' implying real-time data, but fails to detail critical aspects like rate limits, authentication needs, data freshness, error handling, or response format. This leaves significant gaps in understanding the tool's operational behavior.

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 the core purpose without unnecessary words. It is appropriately sized for the tool's complexity, making it easy to parse quickly.

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's moderate complexity (2 parameters, no annotations, but with an output schema), the description is minimally complete. It states what the tool does but lacks details on usage, behavior, and parameters. The presence of an output schema reduces the need to explain return values, but overall, the description leaves gaps in operational context.

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

Parameters3/5

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

The description does not add meaning beyond the input schema, which has 0% description coverage. It implies parameters for station and possibly limit (via 'board'), but offers no specifics on station format (e.g., codes, names) or limit usage. With two parameters and low schema coverage, the description compensates minimally, meeting the baseline for adequate but incomplete parameter context.

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 verb ('Get') and resource ('live departure board for a Belgian train station'), making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'be_search_connections' or 'ch_get_departures', which might offer similar functionality for different regions or contexts.

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, such as 'be_search_connections' for route planning or 'ch_get_departures' for Swiss stations. It lacks explicit context, prerequisites, or exclusions, leaving usage decisions ambiguous.

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/mirodn/mcp-server-public-transport'

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