Skip to main content
Glama

Find a train

find_train
Read-onlyIdempotent

Use to find a train when you do not have its id: search by destination, time window or headcode. Returns every candidate with a match quality, never a silent choice. A station code such as MAN or the full name is an exact match, due_now trains are included, and departed trains are hidden unless include_departed is true. Use get_departures for a general board and get_train for one known train. Read only. Predictions are unofficial and may be wrong. Station screens are the official source.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_train"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterNoISO 8601 with offset, for example 2026-11-16T08:00:00+00:00.
beforeNoISO 8601 with offset, for example 2026-11-16T08:00:00+00:00.
stationNoStation code, for example EUS or PAD. Default EUS. Call list_stations to see which are live.
headcodeNoTrain headcode, for example 1H16.
destinationNoSubstring or station code, for example MAN.
include_departedNotrue also returns trains with a recorded actual departure.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / after / description
      Previous value: -"ISO 8601 with offset"New value: +"ISO 8601 with offset, for example 2026-11-16T08:00:00+00:00."
    • changedInput schema / properties / before / description
      Previous value: -"ISO 8601 with offset"New value: +"ISO 8601 with offset, for example 2026-11-16T08:00:00+00:00."
    • addedInput schema / properties / headcode / description
      Added value: +"Train headcode, for example 1H16."
    • changedInput schema / properties / station / description
      Previous value: -"Station code, for example EUS. Default EUS."New value: +"Station code, for example EUS or PAD. Default EUS. Call list_stations to see which are live."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive, openWorld), and the description adds traits they do not: results are exhaustive with a match quality and "never a silent choice," due_now trains are included, departed trains are suppressed unless include_departed is set, and outputs are unofficial predictions with station screens as the official source. That is exactly the kind of trust and filtering context an agent needs before relying on the result.

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?

Front-loaded with usage and alternatives, then behavior, then caveats — a sensible order with no filler sentences. Minor redundancy: "Read only" duplicates readOnlyHint, and the final two sentences could be compressed into one warning about unofficial predictions.

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, and the description compensates by saying results are every candidate with a match quality rather than a single pick. Combined with the inclusion/exclusion rules for due_now and departed trains and the accuracy caveat, an agent has enough to call this correctly and interpret what comes back.

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% and the schema already documents defaults and examples (station default EUS, ISO 8601 offsets, destination as substring), so the baseline is 3. The description's exact-match statement about station codes adds some meaning but is ambiguous about which parameter it governs, given destination is described as "substring or station code," and the include_departed sentence largely restates the schema.

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?

"Use to find a train when you do not have its id: search by destination, time window or headcode" gives a specific verb, resource, and the three search axes. It also implicitly frames the boundary against the id-based sibling, so an agent can distinguish it without opening any schema.

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 condition is explicit ("when you do not have its id") and both alternatives are named with their selecting conditions: "Use get_departures for a general board and get_train for one known train." Nothing about when to route elsewhere is left to inference.

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