Skip to main content
Glama

Get Route Schedule

onebusaway_get_schedule_for_route
Read-only

Full-day schedule for a route — all trips, stop sequences, and departure times for the specified date (defaults to today). Returns up to all trips for the route. For live predictions, use onebusaway_get_arrivals at specific stops 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.
routeIdYesAgency-prefixed route ID (e.g. "1_100259"). Use onebusaway_find_routes or onebusaway_search_routes 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.
tripsNoAll trips for this route on this date, with their stop sequences.
noticeNoGuidance when no trips were found — e.g. no service on weekends or holiday schedule in effect.
routeIdNoThe queried route ID.
tripCountNoNumber of trips for this route on this date.
queriedRouteNoRoute ID queried.
serviceDateMsNoService date as Unix milliseconds.
routeShortNameNoRoute short name.

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."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."
    • 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: `route_not_found`: Route 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: `route_not_found`: Route 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: -[
      -  "route_not_found"
      -]New value: +[
      +  "route_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": [
      +      "routeId",
      +      "routeShortName",
      +      "serviceDateMs",
      +      "trips",
      +      "queriedRoute",
      +      "tripCount"
      +    ]
      +  },
      +  {
      +    "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: `route_not_found`: Route ID does not exist on this instance. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "route_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: -[
      -  "routeId",
      -  "routeShortName",
      -  "serviceDateMs",
      -  "trips",
      -  "queriedRoute",
      -  "tripCount"
      -]
  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 trips were found — e.g. no service on weekends or holiday schedule in effect.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / queriedRoute
      Added value: +{
      +  "description": "Route ID queried.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / tripCount
      Added value: +{
      +  "description": "Number of trips for this route on this date.",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "routeId",
      -  "routeShortName",
      -  "serviceDateMs",
      -  "trips"
      -]New value: +[
      +  "routeId",
      +  "routeShortName",
      +  "serviceDateMs",
      +  "trips",
      +  "queriedRoute",
      +  "tripCount"
      +]
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, the description adds useful behavioral context: it returns a full-day schedule, includes all trips/stop sequences/departure times, defaults to today, and is not a live-prediction endpoint. It does not discuss result limits or edge cases, but the core behavior is well disclosed.

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 short sentences, front-loaded with the tool's main behavior, followed by the key alternative. There is no filler or redundant explanation; every sentence adds either scope, content, or routing guidance.

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?

Between the full parameter documentation, output schema, readOnlyHint, and the behavioral description, an agent has enough to select and call the tool correctly. It is slightly light on explicit disambiguation from stop-level schedules, but that does not block correct usage.

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 the schema already documents routeId and date thoroughly. The description contributes the 'defaults to today' nuance and implies date controls the service day, but these are mostly echoed in the schema. This is the appropriate baseline for full schema 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 is specific: 'Full-day schedule for a route — all trips, stop sequences, and departure times for the specified date.' It names the resource (route), the scope (full-day), and the return content, clearly separating it from live-prediction and stop-level siblings. The only slight omission is not explicitly contrasting with onebusaway_get_schedule_for_stop, but the route-level framing is unambiguous.

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?

The description gives an explicit routing rule: 'For live predictions, use onebusaway_get_arrivals at specific stops instead.' This tells an agent when not to use the tool and which sibling to choose. It does not exclude or contrast stop-level schedule retrieval, but the live-prediction distinction is the most important alternative condition.

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.