Skip to main content
Glama

next_departures

Get the next departures for one stop on the TTC, Hamilton HSR or GO Transit, including UP Express stations. Static schedule candidates from the persistent schedule store are merged with GTFS Realtime trip updates (BusTime for the TTC, the City of Hamilton feed for HSR, the Metrolinx Open Data API for GO and UP Express), and realtime entries replace matching scheduled entries. Stop ids can collide between agencies: pass agency to say which agency the stop belongs to. Without agency, a stop id that exists in more than one agency returns an error naming every match instead of guessing.

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_id": "<stop_id>"
    },
    "name": "next_departures"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum departures to return
agencyNoOptional agency the stop belongs to: ttc, hsr or go. Required when the stop id exists in more than one agency.
stop_idYesA stop_id from search_stops. A parent station includes its child stops.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / agency / description
      Previous value: -"Optional agency the stop belongs to: ttc or hsr. Required when the stop id exists in both agencies."New value: +"Optional agency the stop belongs to: ttc, hsr or go. Required when the stop id exists in more than one agency."
    • changedInput schema / properties / agency / enum
      Previous value: -[
      -  "ttc",
      -  "hsr"
      -]New value: +[
      +  "ttc",
      +  "hsr",
      +  "go"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/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 well: it discloses that static schedule candidates are merged with GTFS Realtime trip updates from specific feeds and that realtime entries replace matching scheduled entries, which is genuinely useful for interpreting results. It omits auth requirements, rate limits, and whether departures are ordered chronologically, which keeps it below a 5 for a no-annotation tool.

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?

Three sentences, front-loaded with the purpose, then the data-merge mechanics, then the agency/stop-id constraint. Each sentence adds distinct information; the realtime feed enumeration is slightly dense but justified for a multi-agency tool.

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?

For a three-parameter read tool with no output schema, the definition covers data sources, merge semantics, and the main failure mode. It does not describe ordering of results or how realtime delays surface, but the rule that an absent output schema lowers the return-value burden keeps this from being a significant gap.

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, but the description adds real meaning beyond the schema: it explains the stop-id collision problem across agencies, the exact failure mode without agency, and that parent stations expand to child stops. That exceeds what the field-level descriptions convey on their own.

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 and resource (next departures for one stop) and scopes it across named agencies (TTC, HSR, GO, UP Express). It also names search_stops as the source of stop_id, making the relationship to a sibling concrete rather than inferred.

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 clear conditional guidance: pass agency when a stop id exists in more than one agency, and explains that omitting it produces an error naming every match rather than guessing. It stops short of saying when to prefer this over route_vehicles or service_alerts, but usage context for the primary case is unambiguous.

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