Skip to main content
Glama

Alternative routes

mb_alternative_routes
Read-onlyIdempotent

Find alternative routes when direct trains are full or costly: one-change train/bus journeys and nearby station, bus city, and airport options.

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 (bus+bus too; price per adult, total duration, wait at the change); a direct bus in nearby_bus_routes can be cheaper and faster. nearby_*: routes from or to stations, bus cities and airports near the two stations, with the cheapest price where known (classes_listed is the API's raw count, not the 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.

Input Schema

NameRequiredDescriptionDefault
dateYesTravel date YYYY-MM-DD, e.g. '2026-10-14'. Sales open about 18 days ahead.
originYesTrain station id from mb_find_place(mode='train'), e.g. 1 (Tehran) or 191 (Mashhad).
destinationYesTrain station id from mb_find_place(mode='train'), e.g. 1 (Tehran) or 191 (Mashhad).

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the safe read-only, idempotent, open-world profile, so the description is freed to add real behavioral context: seat counts may be cached and must be confirmed with a search, and classes_listed is the API's raw class count rather than bookable classes. These caveats materially change how an agent trusts and reports the data.

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?

Purpose is front-loaded in one clause, then structured field notes for with_one_change and nearby_* routes. Dense but every sentence carries information; slight density could be trimmed but nothing is wasted.

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

Completeness5/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 compensates by naming the returned sections (with_one_change, nearby_bus_routes, nearby_*), their contents (price, duration, wait at change), and the correct follow-up tools. An agent has everything needed to call it and interpret the result.

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?

All three parameters are fully documented in the schema (origin/destination as mb_find_place train station ids, date with the 18-day sales window), so the schema does the heavy lifting and the description adds no parameter-level detail. Baseline 3 is appropriate at 100% coverage.

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?

States a specific purpose: alternatives when direct trains are full or expensive, covering one-change trips plus nearby train/bus/flight routes. It clearly distinguishes itself from direct-search siblings like mb_search_trains by scoping to the 'no good direct option' case.

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

Usage Guidelines5/5

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

Explicitly says when this is useful (direct trains full or dear), warns that a direct bus in nearby_bus_routes may be cheaper and faster, and tells the agent to pass the returned ids to mb_search_trains, mb_search_buses or mb_search_flights. That is a complete use/next-step routing.

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