Skip to main content
Glama

Train price calendar

mb_train_price_calendar
Read-onlyIdempotent

Build a daily train fare calendar for a route and date range, showing only days with free seats so you can choose a travel day based on price.

Instructions

Cheapest train ticket per day (one adult) for a route, only days with free seats.

Then mb_search_trains for the chosen day. Sales open about 18 days ahead.

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>"
    },
    "name": "mb_train_price_calendar"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoNumber of days to cover.
quotaNoSeat quota: general (mixed), men, women, or car transport.general
seatsNoSeats needed.
originYesTrain station id from mb_find_place(mode='train'), e.g. 1 (Tehran).
start_dateNoFirst day YYYY-MM-DD; default today.
destinationYesTrain station id from mb_find_place(mode='train'), e.g. 1 (Tehran).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.5.0
    • 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)."
    • changedInput schema / properties / quota / description
      Previous value: -"Seat quota: general (families, mixed), men only, women only, or car transport."New value: +"Seat quota: general (mixed), men, women, or car transport."
    • changedInput schema / properties / seats / description
      Previous value: -"Seats needed; days without that many free seats are left out."New value: +"Seats needed."
    • removedInput schema / properties / start_date / anyOf
      Removed value: -[
      -  {
      -    "format": "date",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / start_date / description
      Previous value: -"First day YYYY-MM-DD, e.g. '2026-10-10'; default today."New value: +"First day YYYY-MM-DD; default today."
    • addedInput schema / properties / start_date / format
      Added value: +"date"
    • addedInput schema / properties / start_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / title
      Removed value: -"mb_train_price_calendarArguments"
  2. Changed7 schema fields changedv0.3.0
    • removedInput schema / properties / days / title
      Removed value: -"Days"
    • removedInput schema / properties / destination / title
      Removed value: -"Destination"
    • removedInput schema / properties / origin / title
      Removed value: -"Origin"
    • removedInput schema / properties / quota / title
      Removed value: -"Quota"
    • removedInput schema / properties / seats / title
      Removed value: -"Seats"
    • removedInput schema / properties / start_date / title
      Removed value: -"Start Date"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "mb_train_price_calendarDictOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-destructive, and open-world behavior, so the bar is lower. The description still adds real behavioral context beyond them: results are filtered to days with free seats, pricing is per one adult, and the ~18-day sales window bounds data availability.

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?

Two short sentences, front-loaded with what is returned, followed by the next-step guidance. No filler or redundant restatement of the name.

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?

There is no output schema, so the description carries the return-value burden; it does say each entry is a per-day cheapest price and that only seat-available days appear, but it does not describe the shape of each entry. For a six-parameter calendar tool this is nearly complete.

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 ids, days, quota, seats, and start_date are already documented in the schema. The description adds only the 'one adult' framing, which slightly conflicts with the seats parameter allowing up to 10 and is not clarified. Baseline 3 is appropriate.

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 concrete verb+resource: the cheapest train ticket price per day for a route, one adult, limited to days with free seats. That is specific enough to separate it from mb_train_price (single-day pricing) and mb_search_trains (actual train listings) among the siblings.

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?

Explicitly routes the agent to mb_search_trains for the chosen day, which makes the intended two-step workflow clear. It also warns that sales open roughly 18 days ahead, explaining why the calendar may be sparse. It stops short of stating when to prefer mb_train_price instead of the calendar.

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