Skip to main content
Glama

Search trains

rj_search_trains
Read-onlyIdempotent

Search one-way Iranian trains between two stations on a given date to compare Toman prices, available seats, and wagon classes for trip planning.

Instructions

Search one-way trains between two stations on a date, with prices in Toman and free seats.

Each row is one train and wagon class. free_seats is what the site shows (it shows "20+" above 20 and sells at most 10 per booking). Pass a row's ref to rj_train_stops for its stops. Prices are per passenger. Search only: it never reserves or pays. Raja may answer only from an Iranian IP.

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

Input Schema

NameRequiredDescriptionDefault
dateYesTravel date, Jalali like 1405/08/30 or Gregorian like 2026-11-21.
limitNoMaximum rows.
originYesOrigin station: Persian name, English name or code, e.g. تهران, Tehran or 1.
passengersNoNumber of passengers.
destinationYesDestination station, same forms as origin, e.g. مشهد or 191.
ticket_typeNoSeat group: family (mixed, default) or male / female for same-sex compartments.family
include_sold_outNoAlso list trains with no free seats.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations by disclosing the access constraint ('Raja may answer only from an Iranian IP') and the read-only behavior in plain terms. It also explains that `free_seats` is a site-reported figure capped at '20+' and that at most 10 seats sell per booking — non-obvious operational detail an agent cannot get from structured fields.

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?

Front-loads the core search scope in one sentence, then adds only high-value details (free_seats interpretation, ref hand-off, no-booking guarantee, IP constraint). No filler or repetition of the schema.

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 carries the burden and does so well by stating that each row is one train and wagon class and explaining the two most confusing returned fields. Minor gaps remain: nothing about pagination/`limit` behavior or result ordering, which matter given up to 100 rows.

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 coverage is 100%, so baseline is 3, but the description adds meaning not in the schema: prices are per passenger (clarifying how `passengers` interacts with returned price) and the 10-per-booking cap that explains the 9-passenger maximum. `free_seats` and `ref` are described as output fields, which is useful but sits outside parameter semantics.

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?

Opens with a specific verb, resource and scope: searching one-way trains between two stations on a date, returning prices in Toman and free seats. It also draws a clear boundary against rj_train_stops by explaining that a row's `ref` is what feeds that sibling.

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: use this for search, then pass `ref` to rj_train_stops for stops, and it states 'Search only: it never reserves or pays' so an agent won't expect a booking flow. It lacks an explicit when-not-to-use for station resolution (rj_stations), though the origin/destination forms accepted largely remove that need.

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