Skip to main content
Glama

Train run by number

get_train_status
Read-onlyIdempotent

Every run of a train number on one service date with every calling point: scheduled, expected and recorded arrival and departure in UTC, platform where stated, cancellations, per-stop delay, and the railway's stated reason for a delay or cancellation in its own words. Expected times appear only on networks whose operator publishes live expected times, and only while the run is not stale (updated in the last 15 minutes); elsewhere a run is the timetable plus recorded times and cancellations. A number can run more than once a day or under several operators: runs are never merged, each is listed, and number_identity says how far the number names one run on its network. total counts every matching run; returned holds the first 10 by scheduled departure: narrow with network, operator or origin when total is larger. Runs are kept for about 45 days; timetables are held up to about 36 hours 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": {
      "number": "<number>",
      "date": "<date>"
    },
    "name": "get_train_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesService date YYYY-MM-DD: the date the run starts on in its railway's time zone.
numberYesTrain number as published, e.g. 1A23, 171 or RJX 860.
originNoOrigin station: its public code or its whole name.
networkNoThe railway's country code, e.g. GB, US or CH.
operatorNoOperator code, e.g. VT or SBB.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, open-world), and the description adds substantial behavior the annotations cannot: expected times appear only on networks publishing live data and only while the run is fresher than 15 minutes, runs are kept ~45 days, timetables ~36 hours ahead, and results cap at 10 of total. It even explains that runs are never merged and how to interpret number_identity.

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?

Information-dense and front-loaded with the payload contents, then freshness, then pagination, then retention — a sensible order with no filler sentences. It is delivered as one long paragraph, which makes the freshness and pagination rules harder to scan than they would be as short separated clauses.

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?

There is no output schema, yet the description specifies what is returned, the 10-of-total truncation with filtering remedies, live-vs-timetable data availability, staleness, identity ambiguity, and data retention windows. For a five-parameter lookup with no output schema, essentially nothing an agent needs to call or interpret it is missing.

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 the baseline is 3; the description still adds meaning by explaining that one number may run multiple times a day or under several operators, which motivates the network/operator/origin filters, and it clarifies that 'date' is the start date in the railway's own timezone. It does not add syntax detail beyond that, keeping it at 4 rather than 5.

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 precise verb+resource: 'Every run of a train number on one service date with every calling point', then enumerates the exact fields returned (scheduled/expected/recorded times, platform, cancellations, delay, reason). This clearly separates it from station- or punctuality-oriented siblings such as get_station_board and get_rail_punctuality.

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?

Gives concrete narrowing advice — 'narrow with network, operator or origin when total is larger' — which is actionable selection guidance tied to a real condition. It stops short of naming sibling tools or stating when-not-to-use in favour of a station board or punctuality endpoint, so it is not fully explicit.

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