Skip to main content
Glama
GTFS Realtime MCP Server

GTFS Realtime MCP Server

by bribroder

get_next_train

Find when the next train bound for a destination will arrive at an origin station using station names or GPS coordinates.

Instructions

Find out when the next train bound for a destination will arrive at the origin station. You can provide either station names OR gps coordinates (lat/lon) for origin and destination.

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": "get_next_train"
  }
}

Input Schema

NameRequiredDescriptionDefault
dest_latNo
dest_lonNo
origin_latNo
origin_lonNo
dest_station_nameNo
origin_station_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations exist, so the description carries the entire behavioral burden, and it says nothing about what happens with missing, partial, or conflicting location inputs — notable given all six parameters are optional. Because an output schema exists, return values needn't be explained, but validation and failure behavior remain undisclosed.

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?

Two short sentences, front-loaded with the core action and followed by the input-mode constraint. Nothing is padded, though the second sentence could be tightened into an explicit either/or requirement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema covers results, and the description covers the basic action plus input modes. However, with six fully optional parameters and no annotations, it should specify which combination is mandatory and what counts as a valid request.

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 0%, so the description must compensate, and it does add real meaning by grouping the six parameters into two mutually exclusive pairs (name-based vs lat/lon). It still omits units, coordinate format, station-name matching or ambiguity handling, and the rule when both forms or neither form are supplied.

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 states a specific verb and resource: find when the next train to a destination arrives at an origin station. That clearly separates it from plan_trip (itinerary planning) and list_stations_by_line, though it never names or routes away from any sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It tells the caller to supply either station names or lat/lon for origin and destination, which implies usage conditions, but gives no when-to-use versus plan_trip or check_service_alerts and no prerequisites or exclusions.

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