Skip to main content
Glama
mirodn

mcp-server-public-transport

be_search_stations

Search for Belgian train stations by name to find station information for public transport planning.

Instructions

Search for Belgian train stations by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'be_search_stations' tool. It validates the query, constructs API parameters, fetches station data from the iRail API via fetch_json, and handles errors.
    async def be_search_stations(query: str) -> Dict[str, Any]:
        if not query or not query.strip():
            raise ValueError("Station search query cannot be empty")
    
        params = {"input": query.strip(), "format": "json"}
    
        try:
            logger.info(f"Searching stations for: {query.strip()}")
            return await fetch_json(f"{BE_BASE_URL}/stations/", params)
        except TransportAPIError as e:
            logger.error(f"Belgium station search failed: {e}", exc_info=True)
            raise
  • tools/be.py:52-55 (registration)
    Registers the 'be_search_stations' tool with the MCP server using the @mcp.tool decorator, specifying name and description.
    @mcp.tool(
        name="be_search_stations",
        description="Search for Belgian train stations by name."
    )
  • tools/be.py:107-112 (registration)
    Includes 'be_search_stations' in the list of tools returned by register_be_tools(mcp), completing the registration process.
    return [
        be_search_connections,
        be_search_stations,
        be_get_departures,
        be_get_vehicle
    ]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It states it's a search operation but doesn't describe what results look like, whether there are rate limits, authentication requirements, or how results are sorted/filtered. The agent would need to guess about these important behavioral aspects.

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 - a single sentence that communicates the core purpose without any wasted words. It's front-loaded with the essential information and doesn't include unnecessary details or explanations.

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?

For a simple search tool with 1 parameter and an output schema, the description is minimally adequate but lacks important context. The existence of an output schema means return values are documented elsewhere, but the description doesn't address behavioral aspects like result format, limitations, or error conditions that would help the agent use it effectively.

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 mentions searching 'by name' which adds context about the 'query' parameter's purpose, but with 0% schema description coverage and only 1 parameter, this provides limited additional value. The baseline for 0 parameters would be 4, but with 1 parameter and minimal semantic explanation, a score of 3 reflects adequate but not comprehensive parameter guidance.

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 action ('Search for') and resource ('Belgian train stations by name'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'ch_search_stations' or 'no_search_places' beyond specifying the Belgian geographic scope.

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 like 'be_search_connections' or 'ch_search_stations'. It mentions the Belgian scope but doesn't explain why one would choose this over other search tools or what specific use cases it addresses.

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