Skip to main content
Glama
mirodn

mcp-server-public-transport

be_get_vehicle

Retrieve detailed information about a specific Belgian train vehicle using its unique ID to access operational data and specifications.

Instructions

Get details about a specific Belgian train vehicle by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vehicle_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that fetches details for a Belgian train vehicle by ID using the iRail API.
    async def be_get_vehicle(vehicle_id: str) -> Dict[str, Any]:
        if not vehicle_id or not vehicle_id.strip():
            raise ValueError("Vehicle ID must be provided for vehicle lookup")
    
        params = {"id": vehicle_id.strip(), "format": "json"}
    
        try:
            logger.info(f"Fetching vehicle info: {vehicle_id.strip()}")
            return await fetch_json(f"{BE_BASE_URL}/vehicle/", params)
        except TransportAPIError as e:
            logger.error(f"Belgium vehicle fetch failed: {e}", exc_info=True)
            raise
  • tools/be.py:90-93 (registration)
    Registers the tool with MCP server using the @mcp.tool decorator, specifying name and description.
    @mcp.tool(
        name="be_get_vehicle",
        description="Get details about a specific Belgian train vehicle by its ID."
    )
  • tools/be.py:107-112 (registration)
    Includes the be_get_vehicle function in the list of tools returned by register_be_tools.
    return [
        be_search_connections,
        be_search_stations,
        be_get_departures,
        be_get_vehicle
    ]
  • server.py:51-51 (registration)
    Calls register_be_tools to register all BE tools, including be_get_vehicle, with the MCP server instance.
    be_tools = register_be_tools(mcp)
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 of behavioral disclosure. It states the tool 'Get details,' which suggests a read-only operation, but does not disclose any behavioral traits such as error handling, rate limits, authentication needs, or what 'details' include. This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

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 is front-loaded with the tool's purpose. There is no wasted language, and it directly communicates the essential information without unnecessary elaboration, 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 that there is an output schema (which should cover return values), the description does not need to explain outputs. However, with no annotations and low schema coverage, it lacks details on behavioral aspects like error cases or usage context. It is minimally adequate but has clear gaps in providing a complete understanding of the tool's operation and constraints.

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% description coverage, so the description must compensate. It adds meaning by specifying that the parameter 'vehicle_id' refers to a 'Belgian train vehicle ID,' which clarifies the semantics beyond the schema's generic 'Vehicle Id' title. However, it does not provide format examples or constraints, leaving some ambiguity.

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

Purpose5/5

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

The description clearly states the specific action ('Get details') and resource ('Belgian train vehicle by its ID'), distinguishing it from siblings like be_get_departures or be_search_stations that handle different operations. It precisely identifies what the tool does without being vague or tautological.

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

Usage Guidelines3/5

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

The description implies usage when details about a specific Belgian train vehicle are needed, but it does not explicitly state when to use this tool versus alternatives like be_search_connections or ch_get_departures. No exclusions or clear context for tool selection are provided, leaving usage somewhat inferred.

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