Skip to main content
Glama

RailRoute journey planner

Plan a journey

plan_journey
Read-onlyIdempotent

Every practical way to get from one place to another: direct trains with their fares per class, journeys with one change of train, flights, mixed train-and-flight itineraries, and GOVERNMENT BUSES from the state road transport corporations, priced from their own reservation systems. This is the whole answer in one call. Place ids come from find_place.

Use it for bus questions too. On a large share of the corridors these corporations serve there is no through train at all — Mysuru to Mangaluru runs twenty-five buses a day and not one direct train — so a journey this tool answers with a bus is often the only through service that exists, not a second-best.

Pass train_class when the traveller has named one ("3A", "sleeper") and every train is priced in it; leave it out and each train is priced in every class we have evidence it carries. Pass modes: "trains_only" when they have said train — do not ask them to choose otherwise, because the point of this planner is that they do not have to. Pass arrive_by: true when they named a time they must BE somewhere rather than a time they want to leave.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesPlace id from find_place
dateYesTravel date in IST. Today is allowed; the past is refused.
fromYesPlace id from find_place
limitNoHow many of EACH kind to return. Raise it only if the traveller asks to see more.
modesNoRestrict the answer. Default 'any' ranks trains, flights and government buses together — leave it out unless the traveller has actually named a mode. 'trains_only' and 'flights_only' both drop the buses.any
quotaNoGN
arrive_byNoWhen true, `date` is the day they must ARRIVE, and journeys may depart the day before.
train_classNoPrice every train in this class: 2S Second Sitting, SL Sleeper, CC AC Chair Car, 3E AC 3 Economy, 3A AC 3 Tier, 2A AC 2 Tier, 1A First AC, EC Executive Chair Car. Omit to price each train in every class we know it carries.
ask_preferencesNoWhether to ask the traveller for a travel class when they have not named one. Set false for automated or bulk use.
include_connectionsNoJourneys with one change of train. 'auto' searches for them when direct trains are thin, which is when they matter; 'always' searches regardless and costs a few more seconds.auto

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover readOnly and idempotent safety, and the description adds substantial behavioral context: it explains that the tool aggregates from multiple reservation systems, prices trains per class when train_class is omitted, adjusts departure day with arrive_by, and ranks modes together by default. It discloses that it includes government buses and that they may be the only through service. No contradictions with annotations; the description meaningfully extends beyond the structured metadata.

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 description is longer than typical but well-structured: purpose first, then bus-specific rationale, then parameter guidance. Every sentence contributes value, and it is front-loaded with the core function. While slightly verbose, it is not padded and reads coherently as a complete usage guide.

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?

For a read-only tool with 10 parameters and no output schema, the description covers all essential usage decisions: what results are returned, when to include buses, how to handle train class, modes, arrival-based timing, and the meaning of limit. It also directs the user to find_place for IDs. No critical context is missing for an agent to call the tool correctly.

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?

Schema description coverage is 90%, so the schema already documents most parameters. The description adds semantic depth for train_class (explains pricing behavior), modes (restriction semantics), and arrive_by (date interpretation), and clarifies that limit applies per kind. However, the quota parameter has no schema description nor any mention in the tool description, leaving a minor gap that the description does not compensate for.

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 verb and resource: it plans a journey by enumerating all practical modes (direct trains, one-change journeys, flights, mixed, government buses). It explicitly contrasts with sibling tools by framing itself as the comprehensive 'whole answer in one call', and even references find_place for IDs, making its purpose distinct and unambiguous.

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?

The description gives explicit when-to-use guidance, including a dedicated paragraph for bus questions and a concrete example (Mysuru–Mangaluru) where buses are the only through service. It also instructs when to pass train_class, modes='trains_only', and arrive_by, and even states not to ask the traveller to choose modes because the planner is designed to avoid that. This leaves no ambiguity about when to prefer this tool over siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources