Skip to main content
Glama

Get Real-Time Arrivals

onebusaway_get_arrivals
Read-only

Real-time arrivals and departures at a stop. Returns predicted arrival times, schedule deviation (how many seconds late/early), vehicle positions, and any active service alerts. The predicted boolean on each arrival indicates whether GPS tracking backs the estimate — predicted=false means schedule-only. Use tripId from results for follow-up onebusaway_get_trip calls. Stop IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_75403").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stopIdYesAgency-prefixed stop ID (e.g. "1_75403" for Metro Transit stop 75403). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs.
minutesAfterNoInclude arrivals expected within the next N minutes — an integer from 0 to 240. Defaults to 35. For a longer horizon, use onebusaway_get_schedule_for_stop.
minutesBeforeNoInclude arrivals that departed up to this many minutes ago — an integer from 0 to 60. Defaults to 5.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of arrivals in the time window.
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when no arrivals were found — widen minutesAfter, or check onebusaway_get_schedule_for_stop for scheduled service.
stopIdNoThe queried stop ID.
arrivalsNoArrivals and departures at this stop within the requested time window.
stopNameNoStop name.
situationsNoActive service alerts at this stop — those attached to the stop itself and those referenced by its arrivals, each listed once.
currentTimeNoServer time as Unix milliseconds, for computing countdown timers.
queriedStopNoStop ID queried.
windowMinutesNoTime window used for the arrivals query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • changedInput schema / properties / minutesAfter / description
      Previous value: -"Include arrivals expected within the next N minutes. Defaults to 35."New value: +"Include arrivals expected within the next N minutes — an integer from 0 to 240. Defaults to 35. For a longer horizon, use onebusaway_get_schedule_for_stop."
    • addedInput schema / properties / minutesAfter / maximum
      Added value: +240
    • addedInput schema / properties / minutesAfter / minimum
      Added value: +0
    • changedInput schema / properties / minutesAfter / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / minutesBefore / description
      Previous value: -"Include arrivals that departed up to this many minutes ago. Defaults to 5."New value: +"Include arrivals that departed up to this many minutes ago — an integer from 0 to 60. Defaults to 5."
    • addedInput schema / properties / minutesBefore / maximum
      Added value: +60
    • addedInput schema / properties / minutesBefore / minimum
      Added value: +0
    • changedInput schema / properties / minutesBefore / type
      Previous value: -"number"New value: +"integer"
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when no arrivals were found — e.g. try expanding the time window or check for service alerts."New value: +"Guidance when no arrivals were found — widen minutesAfter, or check onebusaway_get_schedule_for_stop for scheduled service."
    • changedOutput schema / properties / situations / description
      Previous value: -"Active service alerts referenced by arrivals at this stop."New value: +"Active service alerts at this stop — those attached to the stop itself and those referenced by its arrivals, each listed once."
  2. Changed9 schema fields changed
    • removedOutput schema / properties / arrivals / items / properties / predictedArrivalTime / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / arrivals / items / properties / predictedArrivalTime / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / arrivals / items / properties / stopsAway / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / arrivals / items / properties / stopsAway / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / arrivals / items / properties / vehicleId / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / arrivals / items / properties / vehicleId / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `stop_not_found`: Stop ID does not exist on this instance. `rate_limited`: API returned a rate limit response. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `stop_not_found`: Stop ID does not exist on this instance. `rate_limited`: No upstream request slot opened within the queue wait cap, or OneBusAway returned a rate limit response. Other values are possible when a failure originates below the handler."
    • removedOutput schema / properties / situations / items / properties / description / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / situations / items / properties / description / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "stopId",
      +      "stopName",
      +      "currentTime",
      +      "arrivals",
      +      "situations",
      +      "queriedStop",
      +      "count",
      +      "windowMinutes"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `stop_not_found`: Stop ID does not exist on this instance. `rate_limited`: API returned a rate limit response. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "stop_not_found",
      +            "rate_limited"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "stopId",
      -  "stopName",
      -  "currentTime",
      -  "arrivals",
      -  "situations",
      -  "queriedStop",
      -  "count",
      -  "windowMinutes"
      -]
  4. Changed5 schema fields changed
    • addedOutput schema / properties / count
      Added value: +{
      +  "description": "Number of arrivals in the time window.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when no arrivals were found — e.g. try expanding the time window or check for service alerts.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / queriedStop
      Added value: +{
      +  "description": "Stop ID queried.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / windowMinutes
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Time window used for the arrivals query.",
      +  "properties": {
      +    "after": {
      +      "description": "Minutes after current time included.",
      +      "type": "number"
      +    },
      +    "before": {
      +      "description": "Minutes before current time included.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "before",
      +    "after"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "stopId",
      -  "stopName",
      -  "currentTime",
      -  "arrivals",
      -  "situations"
      -]New value: +[
      +  "stopId",
      +  "stopName",
      +  "currentTime",
      +  "arrivals",
      +  "situations",
      +  "queriedStop",
      +  "count",
      +  "windowMinutes"
      +]
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint, it discloses the predicted boolean semantics (predicted=false means schedule-only), what fields arrive with each result, and that service alerts are included. This materially helps the agent interpret responses.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four dense sentences with no filler; the core purpose is front-loaded and each additional sentence adds distinctive value.

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 read-only, single-required-parameter lookup with a full schema and output schema, the description covers return semantics, follow-up usage, and ID format. Nothing needed for correct invocation 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 coverage is 100%, so the schema already documents stopId, minutesAfter, and minutesBefore with types, defaults, ranges, and examples. The description adds only a repeated stop-ID format example, not new parameter meaning.

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: real-time arrivals and departures at a stop, and enumerates the data returned. The title and first sentence align, and it is clearly distinguishable from schedule-focused siblings.

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

Usage Guidelines5/5

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

Explicitly tells the agent when to use it and when not: for real-time arrivals, and in minutesAfter it directs longer horizons to onebusaway_get_schedule_for_stop. It also routes tripId results to onebusaway_get_trip.

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.