Skip to main content
Glama

Cheapest train per day

al_trains_cheapest
Read-onlyIdempotent

Compare daily train fares over a date range for a chosen route and pick the day with the lowest fare; dates without train service are omitted.

Instructions

List the lowest train price for each day from a start date, to pick the cheapest day to travel.

Toman per adult; a missing day has no train.

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": "al_trains_cheapest"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesGregorian 2026-11-11 or Jalali 1405-08-20.
daysNoDays to list from `date`.
originYesCity name (تهران, Mashhad) or code (THR); see al_cities.
destinationYesCity name (تهران, Mashhad) or code (THR); see al_cities.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.2.0
    • changedInput schema / properties / date / description
      Previous value: -"Travel date, Gregorian 2026-11-11 or Jalali 1405-08-20 (the year tells which)."New value: +"Gregorian 2026-11-11 or Jalali 1405-08-20."
    • changedInput schema / properties / days / description
      Previous value: -"How many days to list, starting at `date`."New value: +"Days to list from `date`."
    • changedInput schema / properties / destination / description
      Previous value: -"City name in Persian or English (تهران, Mashhad) or its code (THR, MHD); al_cities lists them."New value: +"City name (تهران, Mashhad) or code (THR); see al_cities."
    • changedInput schema / properties / origin / description
      Previous value: -"City name in Persian or English (تهران, Mashhad) or its code (THR, MHD); al_cities lists them."New value: +"City name (تهران, Mashhad) or code (THR); see al_cities."
  2. First observedv0.1.2

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare a read-only, idempotent, non-destructive open-world call, so the description's job is to add context, and it does: pricing is 'Toman per adult' and 'a missing day has no train', which tells the agent how to interpret absent data. It does not cover ordering, rate limits, or whether prices are cached, so it is good rather than exhaustive.

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 sentences, both front-loaded: the operation and scope come first, then the units and null-day semantics. Nothing is redundant and nothing needs trimming.

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 covers the essentials of the response — one lowest price per day, in Toman per adult, absent where no train exists. It could say more about ordering or how ties/multiple trains are collapsed, but an agent has enough to call and interpret it.

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 coverage is 100% — the date formats, the origin/destination name-or-code forms, and the days default of 7 with a 15 maximum are all documented in the schema. The description only adds that the range runs 'from a start date' and that prices are per adult, which is marginal over what structured fields already provide.

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

Purpose4/5

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

The description pairs a specific verb and resource ('List the lowest train price') with a precise scope ('for each day from a start date'), which an agent can distinguish from the plain al_trains sibling. It stops short of naming al_trains explicitly, so the contrast is inferred from the tool name rather than stated.

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 phrase 'to pick the cheapest day to travel' implies the intended use case but never states when to choose this over al_trains or the other *_cheapest siblings. There are no exclusions or prerequisites (e.g., that it returns one row per day rather than bookable options).

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