Skip to main content
Glama

Alternative routes

mb_alternative_routes
Read-onlyIdempotent

Find alternative trip options when direct trains are full or expensive, including one-change train/bus journeys and nearby train, bus, and flight routes.

Instructions

Alternatives when direct trains are full or dear: trips with one change, and nearby train, bus and flight routes.

with_one_change: up to 7 journeys with one change, any mix of train and bus (price per adult). nearby_*: routes near the two stations with the cheapest price where known (classes_listed is a raw count, not bookable classes); pass their ids to mb_search_trains, mb_search_buses or mb_search_flights. Seat counts here can be cached: confirm with a search.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "origin": "<origin>",
      "destination": "<destination>",
      "date": "<date>"
    },
    "name": "mb_alternative_routes"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesTravel date YYYY-MM-DD (sales open about 18 days ahead).
originYesTrain station id from mb_find_place(mode='train'), e.g. 1 (Tehran).
destinationYesTrain station id from mb_find_place(mode='train'), e.g. 1 (Tehran).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.5.0
    • changedInput schema / properties / date / description
      Previous value: -"Travel date YYYY-MM-DD, e.g. '2026-10-14'. Sales open about 18 days ahead."New value: +"Travel date YYYY-MM-DD (sales open about 18 days ahead)."
    • changedInput schema / properties / destination / description
      Previous value: -"Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran) or 191 (Mashhad)."New value: +"Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran)."
    • changedInput schema / properties / origin / description
      Previous value: -"Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran) or 191 (Mashhad)."New value: +"Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran)."
    • removedInput schema / title
      Removed value: -"mb_alternative_routesArguments"
  2. Changed4 schema fields changedv0.3.0
    • removedInput schema / properties / date / title
      Removed value: -"Date"
    • removedInput schema / properties / destination / title
      Removed value: -"Destination"
    • removedInput schema / properties / origin / title
      Removed value: -"Origin"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "mb_alternative_routesDictOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish that this is a safe, idempotent, read-only lookup, so the bar is lower; the description still adds real behavioral context beyond them — the 7-journey cap, price-per-adult basis, the warning that classes_listed is a raw count rather than bookable classes, and that seat counts may be cached and must be confirmed with a search. It does not address rate limits or result ordering.

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

Conciseness4/5

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

The motivating condition is front-loaded, followed by the two mode groups and a final caveat about caching. It is dense and every clause carries information, though the second paragraph reads somewhat run-on and mixes output semantics with follow-up instructions.

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?

With no output schema, the description takes on the job of describing returns and does so for both modes: journey count, transport mix, price basis, and the classes_listed mismatch. The shape of nearby_* results is only partially described (fields like cheapest price are named but not enumerated), leaving a small gap.

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?

Schema description coverage is 100%, so origin, destination, and date are already fully documented (station ids from mb_find_place, date format, sales window). The description only adds that the two station ids are reused to find 'nearby' routes, which is marginal beyond the schema, so baseline 3 applies.

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 names a specific resource (alternative routes) and defines its two distinct modes, with_one_change and nearby_*, plus the exact condition that motivates the tool (direct trains full or expensive). This distinguishes it from the sibling search tools, which return primary inventory rather than fallbacks.

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

Usage Guidelines4/5

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

It states the triggering condition ('when direct trains are full or dear') and gives explicit next steps: pass the returned ids to mb_search_trains, mb_search_buses, or mb_search_flights. It does not explicitly state when not to use it (e.g. when a normal search suffices), so it falls short of a full when/when-not treatment.

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