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). Useful for planning or when real-time data isn't needed. For live predictions, use onebusaway_get_arrivals instead.

Input Schema

TableJSON 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.

Output Schema

TableJSON 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.
routeCountNoNumber of routes with departures from this stop on this date.
queriedStopNoStop ID queried.
serviceDateMsNoService date as Unix milliseconds (start of service day).

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. 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"
      +]
  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",
      +      "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"
      -]
  4. 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"
      +]
  5. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds useful behavioral context: the schedule defaults to today, lists all departures for the full day, and groups by route and direction. It does not disclose any other side effects, but none are expected for a read-only tool. It slightly goes beyond annotations without contradicting them.

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?

Three sentences with zero fluff. The core purpose is front-loaded, the usage guidance follows, and the alternative is mentioned last. Every sentence earns its place; no redundant or vague phrasing.

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 simple read-only tool with 2 parameters and an output schema present, the description covers the essential operational details: what it returns, default behavior, and when to use an alternative. The output schema handles the return structure, so the description does not need to repeat it. Nothing critical is missing for an agent to invoke it correctly.

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 description coverage is 100%, so both parameters are already well-documented in the schema (date format, stopId format, default behavior). The description does not add significant extra meaning to the parameters themselves; it only reiterates the default date behavior that is already in the schema. This meets the baseline for high coverage.

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?

The description clearly states the verb and resource: 'Full-day departure schedule for a stop' with specific detail on what it lists (every departure by route and direction). It distinguishes from the sibling onebusaway_get_arrivals by explicitly noting that it is not for live predictions, so an agent can tell them apart without opening schemas.

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?

The description gives explicit when-to-use guidance ('Useful for planning or when real-time data isn't needed') and names the alternative tool (onebusaway_get_arrivals) for the opposite case. This directly answers the 'when vs alternatives' question.

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.