Skip to main content
Glama

Next Trains

next_trains

Get next train predictions for a TTC station or platform, with timetable fallback when live data is missing and closure status when service is suspended.

Instructions

Next trains at every rail platform of a station (id, name or alias such as "Dundas" or "Bloor") or at one platform id, from the TTC's NTAS. A platform with no prediction falls back to the timetable (service no_prediction); an empty NTAS answer never means no trains. A platform inside an active closure is service suspended with the closure and no minutes (next_min [], no basis, NTAS's own numbers in ntas_min, no timetable); a closure's end station keeps real minutes on the platform facing the open line. Answers are best effort, from the TTC's own site endpoint.

Input Schema

NameRequiredDescriptionDefault
queryYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 behavioral burden and does well by explaining the timetable fallback, that an empty NTAS answer does not mean no trains, and how active closures affect predictions. It does not discuss authentication, rate limits, or explicit read-only status, but it provides strong edge-case transparency.

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?

The description is front-loaded with the core purpose and then explains relevant fallback and closure semantics. It is dense but mostly earns its length, though the parenthetical line breaks and nested caveats make it slightly harder to scan than ideal.

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 one-parameter read tool with an output schema, the description covers the important behavioral context: station versus platform queries, NTAS fallback, empty-response meaning, and closure semantics. An agent can invoke it correctly without additional explanation.

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?

The schema gives only a bare string for query, so the description adds necessary meaning by saying it accepts a station id, name, or alias such as "Dundas" or "Bloor", or a single platform id. It stops short of documenting platform-id format or validation rules, but it compensates well for the 0% schema description coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool returns next trains at every rail platform of a station or at a single platform id, sourced from TTC's NTAS. The verb and resource are specific, though it does not explicitly distinguish itself from nearby siblings such as arrivals or scheduled_departures.

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 explains the two main usage modes: querying by station id, name, or alias, or querying by a single platform id. It also clarifies fallback and closure behavior, but it does not explicitly say when to use this tool instead of sibling tools like arrivals or scheduled_departures.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.