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).

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. 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 load and does so well: `basis` is always 'timetable', a `live` entry is an observation (within 3 km and heading towards the stop) never an arrival time or delay, the tool never predicts arrivals, the index spans three service days, and the gateway error behavior is disclosed.

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 the core purpose, then params, then the critical 'do not present as arrival times' caveat. It is a dense single paragraph and slightly long, but nearly every sentence earns its place (semantics, limitation, attribution requirement).

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?

Despite an output schema existing, the description supplements it with usage-critical semantics (what `live`/`basis` mean) and obligations (attribution display, verbatim label/coverage). Nothing an agent needs to call and interpret this correctly 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%, so the schema already documents all four parameters including defaults and ranges. The description largely repeats these (stop code source, three-day index, 1-180/default 60, 1-30/default 8) without adding format or syntax beyond the schema, so baseline 3 applies.

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 specific verb+resource ('Timetabled bus departures at one stop') and names its data source (BODS timetables). This clearly distinguishes it from nearby_stops (stop lookup) and route_observations (live positions), so an agent can pick it without opening schemas.

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?

It chains to a sibling ('the NaPTAN ATCO code nearby_stops returns'), states the gateway prerequisite, and warns that a deployment without the index errors out. It does not explicitly contrast when to prefer this over other departure/route tools, but the usage context is clearly conveyed.

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