Skip to main content
Glama

Where trains are now

get_vehicle_status
Read-onlyIdempotent

Where observed trains are right now. Pass a route ref to list its trains, a dated trip ref (from get_departures or a plan_trip leg) to find that train, or a station (stopRef, or a name with coverage) to see trains stopped at or heading to it; a station covers its whole complex. Each train reports the stop it is at or heading to (stopStatus), the stop it last served, and its destination. Coordinates are the vehicle's own when the agency sends them (DC); otherwise a stopped train is placed at its station and a moving one has none. Never pass a bare train number: use find_transit.

Input Schema

NameRequiredDescriptionDefault
refNoRoute, dated trip or stop/station reference. Give this or stop.
stopNoStation name, with coverage. Give this or ref.
limitNo
coverageNoRegion: sfbay (San Francisco Bay Area), dc (Washington DC Metro and Metrobus), nyc (New York City Subway, LIRR and Metro-North). Region names such as SF or Washington DC also work. Pick the region the place is in; where optional, leave it out only if the place could be in several.

Output Schema

NameRequiredDescriptionDefault
asOfYes
statusYes
reasonsYes
sourcesYes
vehiclesYes
attributionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / coverage / description
      Previous value: -"Runtime coverage name or identifier; use find_transit to inspect availability."New value: +"Region: sfbay (San Francisco Bay Area), dc (Washington DC Metro and Metrobus), nyc (New York City Subway, LIRR and Metro-North). Region names such as SF or Washington DC also work. Pick the region the place is in; where optional, leave it out only if the place could be in several."
    • addedInput schema / properties / coverage / enum
      Added value: +[
      +  "sfbay",
      +  "SF",
      +  "San Francisco",
      +  "Bay Area",
      +  "dc",
      +  "DC",
      +  "Washington DC",
      +  "Washington, DC",
      +  "WMATA",
      +  "DC Metro",
      +  "Metrobus",
      +  "nyc",
      +  "NYC",
      +  "New York",
      +  "New York City",
      +  "NYC Subway",
      +  "MTA Subway",
      +  "MTA",
      +  "LIRR",
      +  "Long Island Rail Road",
      +  "Metro-North",
      +  "Metro-North Railroad"
      +]
    • removedInput schema / properties / coverage / maxLength
      Removed value: -256
    • removedInput schema / properties / coverage / minLength
      Removed value: -1
  2. Changed1 schema field changed
    • changedOutput schema / properties / reasons / items / enum
      Previous value: -[
      -  "REALTIME_STALE",
      -  "REALTIME_UNAVAILABLE",
      -  "SCHEDULE_EXPIRED",
      -  "SCHEDULE_APPROXIMATE",
      -  "SCHEDULE_REALTIME_MISMATCH",
      -  "TRIP_CANCELED",
      -  "STOP_SKIPPED",
      -  "VALIDATOR_REJECTED",
      -  "COVERAGE_UNAVAILABLE",
      -  "SCOPE_LIMIT_EXCEEDED",
      -  "ACCESSIBILITY_UNAVAILABLE",
      -  "ENDPOINT_NOT_STEP_FREE"
      -]New value: +[
      +  "REALTIME_STALE",
      +  "REALTIME_UNAVAILABLE",
      +  "SCHEDULE_EXPIRED",
      +  "SCHEDULE_APPROXIMATE",
      +  "SCHEDULE_REALTIME_MISMATCH",
      +  "TRIP_CANCELED",
      +  "STOP_SKIPPED",
      +  "VALIDATOR_REJECTED",
      +  "COVERAGE_UNAVAILABLE",
      +  "SCOPE_LIMIT_EXCEEDED",
      +  "ACCESSIBILITY_UNAVAILABLE",
      +  "ENDPOINT_NOT_STEP_FREE",
      +  "PLANNING_UNAVAILABLE"
      +]
  3. Changed21 schema fields changed
    • addedInput schema / properties / coverage
      Added value: +{
      +  "description": "Runtime coverage name or identifier; use find_transit to inspect availability.",
      +  "maxLength": 256,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / ref / description
      Added value: +"Route, dated trip or stop/station reference. Give this or stop."
    • addedInput schema / properties / stop
      Added value: +{
      +  "description": "Station name, with coverage. Give this or ref.",
      +  "maxLength": 256,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "ref"
      -]
    • changedOutput schema / properties / reasons / items / enum
      Previous value: -[
      -  "REALTIME_STALE",
      -  "REALTIME_UNAVAILABLE",
      -  "SCHEDULE_EXPIRED",
      -  "SCHEDULE_APPROXIMATE",
      -  "SCHEDULE_REALTIME_MISMATCH",
      -  "TRIP_CANCELED",
      -  "STOP_SKIPPED",
      -  "VALIDATOR_REJECTED",
      -  "COVERAGE_UNAVAILABLE",
      -  "SCOPE_LIMIT_EXCEEDED"
      -]New value: +[
      +  "REALTIME_STALE",
      +  "REALTIME_UNAVAILABLE",
      +  "SCHEDULE_EXPIRED",
      +  "SCHEDULE_APPROXIMATE",
      +  "SCHEDULE_REALTIME_MISMATCH",
      +  "TRIP_CANCELED",
      +  "STOP_SKIPPED",
      +  "VALIDATOR_REJECTED",
      +  "COVERAGE_UNAVAILABLE",
      +  "SCOPE_LIMIT_EXCEEDED",
      +  "ACCESSIBILITY_UNAVAILABLE",
      +  "ENDPOINT_NOT_STEP_FREE"
      +]
    • changedOutput schema / properties / sources / items / properties / kind / enum
      Previous value: -[
      -  "gtfs_schedule",
      -  "trip_updates",
      -  "vehicle_positions",
      -  "alerts",
      -  "native_api"
      -]New value: +[
      +  "gtfs_schedule",
      +  "trip_updates",
      +  "vehicle_positions",
      +  "alerts",
      +  "equipment_outages",
      +  "native_api"
      +]
    • removedOutput schema / properties / vehicles / items / properties / coordinates / additionalProperties
      Removed value: -false
    • addedOutput schema / properties / vehicles / items / properties / coordinates / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "latitude": {
      +        "maximum": 90,
      +        "minimum": -90,
      +        "type": "number"
      +      },
      +      "longitude": {
      +        "maximum": 180,
      +        "minimum": -180,
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "latitude",
      +      "longitude"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / vehicles / items / properties / coordinates / properties
      Removed value: -{
      -  "latitude": {
      -    "maximum": 90,
      -    "minimum": -90,
      -    "type": "number"
      -  },
      -  "longitude": {
      -    "maximum": 180,
      -    "minimum": -180,
      -    "type": "number"
      -  }
      -}
    • removedOutput schema / properties / vehicles / items / properties / coordinates / required
      Removed value: -[
      -  "latitude",
      -  "longitude"
      -]
    • removedOutput schema / properties / vehicles / items / properties / coordinates / type
      Removed value: -"object"
    • addedOutput schema / properties / vehicles / items / properties / coordinatesSource
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "vehicle",
      +        "stop"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / vehicles / items / properties / headsign
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / vehicles / items / properties / previousStopName
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / vehicles / items / properties / previousStopRef
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The scheduled stop before stopRef while the train is between stops; null when stopped or off its scheduled pattern."
      +}
    • addedOutput schema / properties / vehicles / items / properties / routeName
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Public route name, e.g. \"A\" or \"Red\"."
      +}
    • addedOutput schema / properties / vehicles / items / properties / stopName
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / vehicles / items / properties / stopRef
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / vehicles / items / properties / stopStatus
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "stopped_at",
      +        "incoming_at",
      +        "in_transit_to"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Relation to stopRef: stopped there, arriving, or travelling towards it."
      +}
    • addedOutput schema / properties / vehicles / items / properties / trainId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The agency's train identifier: an NYCT train ID such as \"1A 1023 207/FAR\" (line, scheduled origin time, origin/destination) or the label WMATA publishes. find_transit resolves it to this train's trip."
      +}
    • changedOutput schema / properties / vehicles / items / required
      Previous value: -[
      -  "id",
      -  "tripInstanceRef",
      -  "routeRef",
      -  "coordinates",
      -  "bearing",
      -  "speedMetersPerSecond",
      -  "observedAt",
      -  "ageSeconds"
      -]New value: +[
      +  "id",
      +  "trainId",
      +  "tripInstanceRef",
      +  "routeRef",
      +  "routeName",
      +  "headsign",
      +  "stopStatus",
      +  "stopRef",
      +  "stopName",
      +  "previousStopRef",
      +  "previousStopName",
      +  "coordinates",
      +  "coordinatesSource",
      +  "bearing",
      +  "speedMetersPerSecond",
      +  "observedAt",
      +  "ageSeconds"
      +]
  4. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely non-obvious behavior: each result reports stopStatus, last served stop and destination, and coordinates are the vehicle's own only when the agency supplies them — otherwise a stopped train is placed at its station and a moving one has none. The note that a station covers its whole complex is exactly the kind of scope disclosure that prevents wrong conclusions from partial results.

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 what the tool returns, then the accepted inputs, then the caveats. The middle sentence is long and semicolon-chained, and the '(DC)' parenthetical is opaque, but nearly every clause carries information an agent needs.

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?

With zero required params, an existing output schema and full safety annotations, the description covers input modes, output semantics and the coordinate fallback well. The only real gap is limit behavior and the unresolved overlap with the get_train_positions sibling.

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 75% and the description reinforces ref (route / dated trip / station), stop (name with coverage) and the station-complex semantics beyond the schema. The limit parameter has no description in either the schema or the description, leaving its effect on result volume undocumented.

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?

Names a concrete resource and scope: real-time positions of observed trains, with three accepted lookup modes spelled out. An agent understands exactly what it retrieves, but the description never distinguishes this from the sibling get_train_positions, which by name appears to do the same thing.

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 per-input usage rules ('Pass a route ref to list its trains', 'a dated trip ref (from get_departures or a plan_trip leg)', 'a station ... to see trains stopped at or heading to it') and an explicit exclusion routing to find_transit for bare train numbers. It stops short of telling the agent when to prefer this over get_train_positions.

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.