Skip to main content
Glama

Get Stop Schedule

onebusaway_get_schedule_for_stop
Read-only

Full-day departure schedule for a stop. Lists every departure by route and direction for the specified date (defaults to today). Optionally filter departure rows by routeId and a half-open Unix-millisecond interval; selection includes counts before and after filtering. Without selectors, returns the complete mapped schedule with no default cap. For live predictions, use onebusaway_get_arrivals instead.

Input Schema

NameRequiredDescriptionDefault
dateNoService date as YYYY-MM-DD (e.g. "2026-05-23"). Must be a real calendar date. Omit or leave blank for today in the agency's timezone.
stopIdYesAgency-prefixed stop ID (e.g. "1_75403"). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs.
routeIdNoExact route ID, combined with departure bounds; omit or leave blank for all routes.
departureFromMsNoInclusive departure lower bound in Unix milliseconds.
departureBeforeMsNoExclusive departure upper bound in Unix milliseconds; must exceed departureFromMs when both are supplied.

Output Schema

NameRequiredDescriptionDefault
dateNoDate parameter used for the schedule request, if specified.
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when no routes were found — e.g. no service on weekends or holiday schedule in effect.
routesNoAll routes with departures from this stop on this date.
stopIdNoThe queried stop ID.
stopNameNoStop name.
timezoneNoValidated timezone of the queried stop agency, or UTC when unavailable or invalid.
selectionNoApplied selectors and departure counts before and after local selection; absent without selectors.
routeCountNoNumber of routes with departures from this stop on this date.
queriedStopNoStop ID queried.
serviceDateMsNoUnchanged upstream schedule-date marker in Unix milliseconds: query time when date is omitted or blank, instance-local midnight for an explicit date.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / departureBeforeMs
      Added value: +{
      +  "description": "Exclusive departure upper bound in Unix milliseconds; must exceed departureFromMs when both are supplied.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / departureFromMs
      Added value: +{
      +  "description": "Inclusive departure lower bound in Unix milliseconds.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / routeId
      Added value: +{
      +  "description": "Exact route ID, combined with departure bounds; omit or leave blank for all routes.",
      +  "type": "string"
      +}
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "stopId",
      -      "stopName",
      -      "serviceDateMs",
      -      "routes",
      -      "queriedStop",
      -      "routeCount"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "timezone",
      +      "stopId",
      +      "stopName",
      +      "serviceDateMs",
      +      "routes",
      +      "queriedStop",
      +      "routeCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / selection
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Applied selectors and departure counts before and after local selection; absent without selectors.",
      +  "properties": {
      +    "departureBeforeMs": {
      +      "description": "Exclusive departure upper bound in Unix milliseconds; must exceed departureFromMs when both are supplied.",
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "departureFromMs": {
      +      "description": "Inclusive departure lower bound in Unix milliseconds.",
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "returned": {
      +      "description": "Count after local selection.",
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "routeId": {
      +      "description": "Exact route ID, combined with departure bounds; omit or leave blank for all routes.",
      +      "type": "string"
      +    },
      +    "total": {
      +      "description": "Count before local selection.",
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "total",
      +    "returned"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / serviceDateMs / description
      Previous value: -"Service date as Unix milliseconds (start of service day)."New value: +"Unchanged upstream schedule-date marker in Unix milliseconds: query time when date is omitted or blank, instance-local midnight for an explicit date."
    • addedOutput schema / properties / timezone
      Added value: +{
      +  "description": "Validated timezone of the queried stop agency, or UTC when unavailable or invalid.",
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / date / anyOf
      Added value: +[
      +  {
      +    "const": "",
      +    "type": "string"
      +  },
      +  {
      +    "description": "A real calendar date in YYYY-MM-DD form (e.g. \"2026-05-23\").",
      +    "format": "date",
      +    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / date / description
      Previous value: -"ISO 8601 date (e.g. \"2026-05-23\"). Defaults to today in the agency's timezone."New value: +"Service date as YYYY-MM-DD (e.g. \"2026-05-23\"). Must be a real calendar date. Omit or leave blank for today in the agency's timezone."
    • removedInput schema / properties / date / type
      Removed value: -"string"
  3. Changed2 schema fields changed
    • 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. 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."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "stop_not_found"
      -]New value: +[
      +  "stop_not_found",
      +  "rate_limited"
      +]
  4. 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",
      +      "serviceDateMs",
      +      "routes",
      +      "queriedStop",
      +      "routeCount"
      +    ]
      +  },
      +  {
      +    "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. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "stop_not_found"
      +          ],
      +          "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",
      -  "serviceDateMs",
      -  "routes",
      -  "queriedStop",
      -  "routeCount"
      -]
  5. Changed5 schema fields changed
    • addedOutput schema / properties / date
      Added value: +{
      +  "description": "Date parameter used for the schedule request, if specified.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when no routes were found — e.g. no service on weekends or holiday schedule in effect.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / queriedStop
      Added value: +{
      +  "description": "Stop ID queried.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / routeCount
      Added value: +{
      +  "description": "Number of routes with departures from this stop on this date.",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "stopId",
      -  "stopName",
      -  "serviceDateMs",
      -  "routes"
      -]New value: +[
      +  "stopId",
      +  "stopName",
      +  "serviceDateMs",
      +  "routes",
      +  "queriedStop",
      +  "routeCount"
      +]
  6. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With readOnlyHint already declaring the safe-read profile, the description adds real behavioral context: the interval is half-open, an unfiltered call returns the complete schedule with no default cap (a potential payload-size hazard), and results report counts before and after filtering. It does not discuss rate limits or error behavior, but the output schema covers return shape.

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 tight sentences, each doing distinct work: purpose, default and filtering, unbounded-return caveat, and the alternative redirection. The alternative is placed last where it acts as a decision checkpoint, and no sentence restates structured fields verbatim.

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 five-parameter read tool with an output schema and readOnlyHint annotation, everything an agent needs to invoke correctly is present: the default date, the one required parameter, how the optional selectors combine, and the fact that omitting them yields an uncapped result.

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 baseline is 3; the description earns above it by stating that date defaults to today in the agency's timezone, that routeId composes with the departure bounds rather than replacing them, and by spelling out the half-open interval semantics and the pre/post-filter counts those bounds produce.

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 — a full-day departure schedule for a stop — and immediately distinguishes it from the live-prediction sibling, onebusaway_get_arrivals. The scope ('every departure by route and direction', 'specified date') is precise enough that an agent can differentiate it from onebusaway_get_schedule_for_route and the arrival tools without opening any schema.

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?

Explicitly routes the agent away for the live-prediction case ('For live predictions, use onebusaway_get_arrivals instead') and clarifies the default date and the unbounded-result behavior. It stops short of contrasting with the near-identical onebusaway_get_schedule_for_route sibling, so it is strong but not complete.

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.