Skip to main content
Glama

next_departures

Timetabled bus departures at one stop, from the Bus Open Data (BODS) timetables. Pass stop (the NaPTAN ATCO code nearby_stops returns), optional at (RFC 3339, default now; the index holds three service days from today), window_minutes (1 to 180, default 60) and limit (1 to 30, default 8). Each departure carries line, destination, operator, scheduled_at (local time) and trip, plus live when a vehicle on that line was seen in the live positions within 3 km and heading towards the stop (vehicle, distance_m, age_s). These are TIMETABLE times: basis is always "timetable", and a live entry is an observation, never an arrival time or a delay. MapMap does not predict arrivals: never present scheduled_at or live as one, and pass on the returned label and coverage verbatim. Requires the MapMap gateway; a deployment without the departures index answers a clear error. Display the returned attribution (NaPTAN and BODS, Open Government Licence v3.0).

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": {
      "stop": "<stop>"
    },
    "name": "next_departures"
  }
}

Input Schema

NameRequiredDescriptionDefault
atNoStart of the window, RFC 3339 (e.g. "2026-10-12T08:00:00+01:00"); default now. The index holds three service days from today.
stopYesThe stop's NaPTAN ATCO code, as `nearby_stops` returns it.
limitNoMost departures to return, 1 to 30 (default 8).
window_minutesNoWindow length, 1 to 180 minutes (default 60).

Output Schema

NameRequiredDescriptionDefault
stopYesThe stop.
basisYesAlways "timetable".
labelYesThe honesty line, verbatim: timetable times, what a live entry is, and that MapMap does not predict arrival times. Pass it on with the departures.
coverageYesWhat the data covers. Pass it on with the departures.
departuresYesDepartures in timetable order.
attributionYesNaPTAN and BODS attribution (Open Government Licence v3.0).
generated_atNoWhen the answer was assembled, RFC 3339.
timetable_dateNoThe service date the requested time falls on, YYYY-MM-DD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / $defs / TransitStopOut / required
      Previous value: -[
      -  "id",
      -  "name",
      -  "lat",
      -  "lon"
      -]New value: +[
      +  "id",
      +  "name",
      +  "lat",
      +  "lon",
      +  "lines"
      +]
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that `basis` is always "timetable", that `live` is a positional observation (within 3 km, heading towards the stop) and never an arrival time or delay, that no prediction is made, and that the index holds only three service days from today. It also states the dependency on the MapMap gateway and the exact failure mode ('a deployment without the departures index answers a clear error') plus an attribution/display obligation, which is unusually complete behavioral context.

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?

A single dense paragraph that is front-loaded with purpose, then inputs, then output semantics, then constraints. Nearly every clause earns its place, but enumerating the output fields (`line`, `destination`, `operator`, `scheduled_at`, `trip`, `vehicle`, `distance_m`, `age_s`) partly duplicates the existing output schema and pushes the length toward the upper bound for a 4-parameter tool.

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?

For a read tool with an output schema, the description adds the interpretive semantics an agent actually needs: what `basis` and `live` mean, what must not be inferred, how to surface `label`/`coverage`/`attribution`, and what happens when the index is absent. Nothing required to call it correctly or to report results responsibly is missing.

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% and the description's parameter detail (defaults, ranges, RFC 3339, ATCO code from nearby_stops) largely restates the schema verbatim. The one genuine addition is the three-service-day index horizon tied to `at`, which explains why an out-of-range date yields nothing. Baseline 3 is appropriate since the schema does the parameter work.

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 and resource: 'Timetabled bus departures at one stop, from the Bus Open Data (BODS) timetables.' It also names the sibling that supplies the key input ('the NaPTAN ATCO code `nearby_stops` returns'), so an agent can distinguish it from nearby_stops and the routing/geo siblings without opening a schema.

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?

Clear usage context: call it with a stop code obtained from nearby_stops, with defaults and ranges spelled out (window 1-180 default 60, limit 1-30 default 8, `at` default now). It also states a hard presentation rule ('never present `scheduled_at` or `live` as one [an arrival prediction]') and passes on `label`/`coverage` verbatim. It stops short of naming an alternative tool or an explicit when-not-to-use case, so it is strong but not complete.

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