onebusaway-mcp-server

Real-time transit stops, routes, arrivals, vehicle positions, and schedules via OneBusAway APIs.

Should I use this

Quality & Safety

A
Description quality
97%
Schema completeness
95%
Naming quality
76%
Poisoning risk
100%
Permission match
100%
Protocol compliance
100%

Findings (3)

  • LOWTool 'onebusaway_list_routes_for_agency' name length outside 3-30 rangein onebusaway_list_routes_for_agency
  • LOWTool 'onebusaway_get_schedule_for_stop' name length outside 3-30 rangein onebusaway_get_schedule_for_stop
  • LOWTool 'onebusaway_get_schedule_for_route' name length outside 3-30 rangein onebusaway_get_schedule_for_route

Based on automated analysis of tool definitions and protocol compliance.

Context Cost

~13,333Tokens (tool definitions)
~10.5 KBTypical response size
Significant attention impact (10.42% of 128k context)

This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.

Install

One-Click Install

Add this to your `claude_desktop_config.json` file:

{
  "mcpServers": {
    "onebusaway-mcp-server": {
      "command": "bun",
      "args": [
        "@cyanheads/onebusaway-mcp-server"
      ]
    }
  }
}

Runnable packages

npm@cyanheads/onebusaway-mcp-server0.2.0streamable-http

Remote endpoints

https://onebusaway.caseyjhand.com/mcpstreamable-http

What it can do

Tool inventory

Tools (15)

🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢onebusaway_list_agencies

List all transit agencies served by this OneBusAway instance. Returns agency IDs, names, contact info, timezone, and geographic coverage center. Agency IDs are needed for onebusaway_list_routes_for_agency and onebusaway_get_vehicles.

Input Schema

{
  "type": "object",
  "properties": {},
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "agencies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Agency ID used in other calls (e.g. \"1\" for Metro Transit)."
          },
          "name": {
            "type": "string",
            "description": "Full agency name."
          },
          "url": {
            "type": "string",
            "description": "Agency website URL."
          },
          "phone": {
            "description": "Agency phone number, or null if not provided.",
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": "string",
            "description": "Agency timezone (e.g. \"America/Los_Angeles\")."
          },
          "coverageCenter": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number",
                "description": "Latitude of the coverage center."
              },
              "lon": {
                "type": "number",
                "description": "Longitude of the coverage center."
              }
            },
            "required": [
              "lat",
              "lon"
            ],
            "additionalProperties": false,
            "description": "Geographic center of the agency's service area."
          },
          "coverageSpan": {
            "type": "object",
            "properties": {
              "latSpan": {
                "type": "number",
                "description": "Latitude span of the coverage area in degrees."
              },
              "lonSpan": {
                "type": "number",
                "description": "Longitude span of the coverage area in degrees."
              }
            },
            "required": [
              "latSpan",
              "lonSpan"
            ],
            "additionalProperties": false,
            "description": "Geographic extent of the agency's service area."
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "phone",
          "timezone",
          "coverageCenter",
          "coverageSpan"
        ],
        "additionalProperties": false,
        "description": "A transit agency with coverage information."
      },
      "description": "All agencies served by this OneBusAway instance."
    },
    "limitExceeded": {
      "type": "boolean",
      "description": "True if the upstream capped the agency list — some agencies were omitted. This endpoint has no pagination to retrieve them."
    },
    "count": {
      "type": "number",
      "description": "Number of transit agencies returned."
    },
    "notice": {
      "description": "Guidance when no agencies were returned.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `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.",
              "examples": [
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "agencies",
        "limitExceeded",
        "count"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_find_stops(lat, lon, radius, query)

Find bus stops near a location. Returns stops within a radius, each with ID, name, direction, served routes, and wheelchair boarding status. Use stopId values from results to fetch real-time arrivals with onebusaway_get_arrivals. Optionally filter by stop code (the number printed on the stop sign, e.g. "75403").

Input Schema

{
  "type": "object",
  "properties": {
    "lat": {
      "type": "number",
      "minimum": -90,
      "maximum": 90,
      "description": "Latitude of the search center, in [-90, 90]."
    },
    "lon": {
      "type": "number",
      "minimum": -180,
      "maximum": 180,
      "description": "Longitude of the search center, in [-180, 180]."
    },
    "radius": {
      "default": 300,
      "description": "Search radius in meters. Must be positive; capped at 1600m, beyond which results degrade. Defaults to 300m.",
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1600
    },
    "query": {
      "description": "Optional stop code filter (the number printed on the stop sign, e.g. \"75403\"). When provided, returns only stops matching this code within the radius.",
      "type": "string"
    }
  },
  "required": [
    "lat",
    "lon"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "stops": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Agency-prefixed stop ID (e.g. \"1_75403\"). Use with onebusaway_get_arrivals."
          },
          "code": {
            "type": "string",
            "description": "The stop code printed on the sign."
          },
          "name": {
            "type": "string",
            "description": "Stop name."
          },
          "lat": {
            "type": "number",
            "description": "Latitude of the stop."
          },
          "lon": {
            "type": "number",
            "description": "Longitude of the stop."
          },
          "direction": {
            "type": "string",
            "description": "Compass direction of travel at this stop (e.g. \"NW\")."
          },
          "routeIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of routes that serve this stop."
          },
          "wheelchairBoarding": {
            "type": "string",
            "enum": [
              "ACCESSIBLE",
              "NOT_ACCESSIBLE",
              "UNKNOWN"
            ],
            "description": "Wheelchair boarding status."
          }
        },
        "required": [
          "id",
          "code",
          "name",
          "lat",
          "lon",
          "direction",
          "routeIds",
          "wheelchairBoarding"
        ],
        "additionalProperties": false,
        "description": "A transit stop with location and route information."
      },
      "description": "Stops within the search radius."
    },
    "limitExceeded": {
      "type": "boolean",
      "description": "True if more stops exist beyond the returned set; narrow the radius to see all."
    },
    "count": {
      "type": "number",
      "description": "Number of stops returned."
    },
    "query": {
      "description": "Stop code filter applied to the search, if any.",
      "type": "string"
    },
    "notice": {
      "description": "Guidance when results are empty or truncated — e.g. how to narrow the radius or verify the stop code.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `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.",
              "examples": [
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "stops",
        "limitExceeded",
        "count"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_find_routes(lat, lon, radius, latSpan, lonSpan, ...)

Find transit routes near a location, optionally filtered by name or number. Returns routes with IDs, short names, and descriptions. Use routeId values to fetch schedules, vehicles, or stop sequences.

Input Schema

{
  "type": "object",
  "properties": {
    "lat": {
      "type": "number",
      "minimum": -90,
      "maximum": 90,
      "description": "Latitude of the search center, in [-90, 90]."
    },
    "lon": {
      "type": "number",
      "minimum": -180,
      "maximum": 180,
      "description": "Longitude of the search center, in [-180, 180]."
    },
    "radius": {
      "default": 500,
      "description": "Search radius in meters. Must be positive; capped at 1600m. Defaults to 500m. Ignored when latSpan and lonSpan are both set.",
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1600
    },
    "latSpan": {
      "description": "Optional bounding-box height in degrees, as an alternative to radius. Takes effect only when lonSpan is also set, in which case radius is ignored.",
      "type": "number",
      "exclusiveMinimum": 0
    },
    "lonSpan": {
      "description": "Optional bounding-box width in degrees, as an alternative to radius. Takes effect only when latSpan is also set, in which case radius is ignored.",
      "type": "number",
      "exclusiveMinimum": 0
    },
    "query": {
      "description": "Filter by route name or number (e.g. \"44\" or \"Link Light Rail\").",
      "type": "string"
    }
  },
  "required": [
    "lat",
    "lon"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "routes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Agency-prefixed route ID (e.g. \"1_100259\"). Use with onebusaway_get_schedule_for_route or onebusaway_get_vehicles."
          },
          "shortName": {
            "type": "string",
            "description": "The number or short name displayed on vehicles (e.g. \"44\")."
          },
          "longName": {
            "type": "string",
            "description": "Full route name."
          },
          "description": {
            "type": "string",
            "description": "Route description."
          },
          "agencyId": {
            "type": "string",
            "description": "Agency ID that operates this route."
          },
          "agencyName": {
            "type": "string",
            "description": "Agency name that operates this route."
          },
          "type": {
            "type": "number",
            "description": "GTFS route type: 0=tram, 1=subway, 2=rail, 3=bus, 4=ferry, 5=cable_car."
          },
          "color": {
            "description": "Route brand color hex (without #), or null.",
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "description": "Agency schedule page URL, or null.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "shortName",
          "longName",
          "description",
          "agencyId",
          "agencyName",
          "type",
          "color",
          "url"
        ],
        "additionalProperties": false,
        "description": "A transit route with agency and type information."
      },
      "description": "Routes found near the specified location."
    },
    "limitExceeded": {
      "type": "boolean",
      "description": "True if more routes exist beyond the returned set; narrow the radius or set latSpan/lonSpan to see all."
    },
    "count": {
      "type": "number",
      "description": "Number of routes returned."
    },
    "query": {
      "description": "Route name/number filter applied to the search, if any.",
      "type": "string"
    },
    "notice": {
      "description": "Guidance when no routes matched — e.g. try a larger radius or different query.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `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.",
              "examples": [
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "routes",
        "limitExceeded",
        "count"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_search_stops(query, maxCount)

Search for stops by name or code. Returns matching stops with IDs and coordinates. Use to resolve a human-readable stop name or number to a stop ID for arrivals lookups with onebusaway_get_arrivals.

Input Schema

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Stop name fragment or stop code (e.g. \"University Way\" or \"75403\")."
    },
    "maxCount": {
      "default": 10,
      "description": "Maximum number of results to return. A positive integer, at most 100. Defaults to 10.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "query"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "stops": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Agency-prefixed stop ID (e.g. \"1_75403\"). Use with onebusaway_get_arrivals."
          },
          "code": {
            "type": "string",
            "description": "The stop code printed on the sign."
          },
          "name": {
            "type": "string",
            "description": "Stop name."
          },
          "lat": {
            "type": "number",
            "description": "Latitude of the stop."
          },
          "lon": {
            "type": "number",
            "description": "Longitude of the stop."
          },
          "direction": {
            "type": "string",
            "description": "Compass direction of travel at this stop."
          },
          "routeIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of routes that serve this stop."
          },
          "wheelchairBoarding": {
            "type": "string",
            "enum": [
              "ACCESSIBLE",
              "NOT_ACCESSIBLE",
              "UNKNOWN"
            ],
            "description": "Wheelchair boarding status."
          }
        },
        "required": [
          "id",
          "code",
          "name",
          "lat",
          "lon",
          "direction",
          "routeIds",
          "wheelchairBoarding"
        ],
        "additionalProperties": false,
        "description": "A transit stop with location and route information."
      },
      "description": "Stops matching the search query."
    },
    "limitExceeded": {
      "type": "boolean",
      "description": "True if more stops match than were returned; raise maxCount or refine the query to see all."
    },
    "query": {
      "type": "string",
      "description": "Search query sent to the API."
    },
    "count": {
      "type": "number",
      "description": "Number of stops returned."
    },
    "truncated": {
      "description": "True when matching stops exceeded maxCount.",
      "type": "boolean"
    },
    "shown": {
      "description": "Number of stops returned when results were truncated.",
      "type": "number"
    },
    "cap": {
      "description": "The maxCount limit applied to truncated results.",
      "type": "number"
    },
    "notice": {
      "description": "Guidance when no stops matched — e.g. try a different name fragment or use onebusaway_find_stops with coordinates.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `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.",
              "examples": [
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "stops",
        "limitExceeded",
        "query",
        "count"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_search_routes(query, maxCount)

Search for routes by name or number. Returns matching routes with IDs. Use to resolve a route short name (e.g. "44") to a route ID for schedule or vehicle lookups with onebusaway_get_vehicles or onebusaway_get_schedule_for_route.

Input Schema

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Route name or number (e.g. \"44\", \"Link\", or \"RapidRide\")."
    },
    "maxCount": {
      "default": 10,
      "description": "Maximum number of results to return. A positive integer, at most 100. Defaults to 10.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "query"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "routes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Agency-prefixed route ID (e.g. \"1_100259\"). Use with onebusaway_get_vehicles or onebusaway_get_schedule_for_route."
          },
          "shortName": {
            "type": "string",
            "description": "The number or short name displayed on vehicles (e.g. \"44\")."
          },
          "longName": {
            "type": "string",
            "description": "Full route name."
          },
          "description": {
            "type": "string",
            "description": "Route description."
          },
          "agencyId": {
            "type": "string",
            "description": "Agency ID that operates this route."
          },
          "agencyName": {
            "type": "string",
            "description": "Agency name that operates this route."
          },
          "type": {
            "type": "number",
            "description": "GTFS route type: 0=tram, 1=subway, 2=rail, 3=bus, 4=ferry, 5=cable_car."
          }
        },
        "required": [
          "id",
          "shortName",
          "longName",
          "description",
          "agencyId",
          "agencyName",
          "type"
        ],
        "additionalProperties": false,
        "description": "A transit route with agency and type information."
      },
      "description": "Routes matching the search query."
    },
    "limitExceeded": {
      "type": "boolean",
      "description": "True if more routes match than were returned; raise maxCount or refine the query to see all."
    },
    "query": {
      "type": "string",
      "description": "Route name/number query sent to the API."
    },
    "count": {
      "type": "number",
      "description": "Number of routes returned."
    },
    "truncated": {
      "description": "True when matching routes exceeded maxCount.",
      "type": "boolean"
    },
    "shown": {
      "description": "Number of routes returned when results were truncated.",
      "type": "number"
    },
    "cap": {
      "description": "The maxCount limit applied to truncated results.",
      "type": "number"
    },
    "notice": {
      "description": "Guidance when no routes matched — e.g. try onebusaway_find_routes with coordinates, or onebusaway_list_routes_for_agency.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `endpoint_unavailable`: The search/route endpoint returns 404 on this OBA instance (e.g. Puget Sound). `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.",
              "examples": [
                "endpoint_unavailable",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "routes",
        "limitExceeded",
        "query",
        "count"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_get_stop(stopId)

Fetch details for a specific stop by ID. Returns the stop's name, coordinates, direction, served routes, and wheelchair accessibility. Stop IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_75403" for Metro Transit stop 75403).

Input Schema

{
  "type": "object",
  "properties": {
    "stopId": {
      "type": "string",
      "minLength": 1,
      "description": "Agency-prefixed stop ID (e.g. \"1_75403\" for Metro Transit stop 75403, \"40_100239\" for Sound Transit). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs."
    }
  },
  "required": [
    "stopId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Agency-prefixed stop ID."
    },
    "code": {
      "type": "string",
      "description": "The stop code printed on the sign."
    },
    "name": {
      "type": "string",
      "description": "Stop name."
    },
    "lat": {
      "type": "number",
      "description": "Latitude of the stop."
    },
    "lon": {
      "type": "number",
      "description": "Longitude of the stop."
    },
    "direction": {
      "type": "string",
      "description": "Compass direction of travel at this stop (e.g. \"NW\")."
    },
    "routeIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "IDs of routes that serve this stop. Use with onebusaway_get_arrivals or onebusaway_get_schedule_for_stop."
    },
    "wheelchairBoarding": {
      "type": "string",
      "enum": [
        "ACCESSIBLE",
        "NOT_ACCESSIBLE",
        "UNKNOWN"
      ],
      "description": "Wheelchair boarding status."
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "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.",
              "examples": [
                "stop_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "id",
        "code",
        "name",
        "lat",
        "lon",
        "direction",
        "routeIds",
        "wheelchairBoarding"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_get_route(routeId)

Fetch details for a specific route by ID. Returns short name, description, agency, route type, and schedule URL. Route IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_100259").

Input Schema

{
  "type": "object",
  "properties": {
    "routeId": {
      "type": "string",
      "minLength": 1,
      "description": "Agency-prefixed route ID (e.g. \"1_100259\"). Use onebusaway_find_routes or onebusaway_search_routes to discover IDs."
    }
  },
  "required": [
    "routeId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Agency-prefixed route ID."
    },
    "shortName": {
      "type": "string",
      "description": "The number or short name displayed on vehicles (e.g. \"44\")."
    },
    "longName": {
      "type": "string",
      "description": "Full route name."
    },
    "description": {
      "type": "string",
      "description": "Route description."
    },
    "agencyId": {
      "type": "string",
      "description": "Agency ID that operates this route."
    },
    "agencyName": {
      "type": "string",
      "description": "Agency name that operates this route."
    },
    "type": {
      "type": "number",
      "description": "GTFS route type: 0=tram, 1=subway, 2=rail, 3=bus, 4=ferry, 5=cable_car."
    },
    "color": {
      "description": "Route brand color hex (without #), or null.",
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "description": "Agency schedule page URL, or null.",
      "type": [
        "string",
        "null"
      ]
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "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.",
              "examples": [
                "route_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "id",
        "shortName",
        "longName",
        "description",
        "agencyId",
        "agencyName",
        "type",
        "color",
        "url"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_list_routes_for_agency(agencyId)

List all routes operated by an agency. Returns route IDs, short names, and descriptions. Use to enumerate an agency's full service before searching for a specific route. Get agencyId values from onebusaway_list_agencies.

Input Schema

{
  "type": "object",
  "properties": {
    "agencyId": {
      "type": "string",
      "minLength": 1,
      "description": "Agency ID (e.g. \"1\" for Metro Transit, \"40\" for Sound Transit). Use onebusaway_list_agencies to discover IDs."
    }
  },
  "required": [
    "agencyId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "routes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Agency-prefixed route ID. Use with onebusaway_get_schedule_for_route or onebusaway_get_vehicles."
          },
          "shortName": {
            "type": "string",
            "description": "The number or short name displayed on vehicles."
          },
          "longName": {
            "type": "string",
            "description": "Full route name."
          },
          "description": {
            "type": "string",
            "description": "Route description."
          },
          "type": {
            "type": "number",
            "description": "GTFS route type: 0=tram, 1=subway, 2=rail, 3=bus, 4=ferry, 5=cable_car."
          },
          "color": {
            "description": "Route brand color hex (without #), or null.",
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "description": "Agency schedule page URL, or null.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "shortName",
          "longName",
          "description",
          "type",
          "color",
          "url"
        ],
        "additionalProperties": false,
        "description": "A transit route operated by this agency."
      },
      "description": "All routes operated by this agency."
    },
    "limitExceeded": {
      "type": "boolean",
      "description": "True if the upstream capped the route list — some routes were omitted. This endpoint has no pagination to retrieve them."
    },
    "agencyId": {
      "type": "string",
      "description": "Agency ID queried."
    },
    "count": {
      "type": "number",
      "description": "Number of routes returned for this agency."
    },
    "notice": {
      "description": "Guidance when no routes were found — verify the agency ID with onebusaway_list_agencies.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `agency_not_found`: Agency 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.",
              "examples": [
                "agency_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "routes",
        "limitExceeded",
        "agencyId",
        "count"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_get_arrivals(stopId, minutesBefore, minutesAfter)

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

{
  "type": "object",
  "properties": {
    "stopId": {
      "type": "string",
      "minLength": 1,
      "description": "Agency-prefixed stop ID (e.g. \"1_75403\" for Metro Transit stop 75403). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs."
    },
    "minutesBefore": {
      "default": 5,
      "description": "Include arrivals that departed up to this many minutes ago. Defaults to 5.",
      "type": "number"
    },
    "minutesAfter": {
      "default": 35,
      "description": "Include arrivals expected within the next N minutes. Defaults to 35.",
      "type": "number"
    }
  },
  "required": [
    "stopId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "stopId": {
      "type": "string",
      "description": "The queried stop ID."
    },
    "stopName": {
      "type": "string",
      "description": "Stop name."
    },
    "currentTime": {
      "type": "number",
      "description": "Server time as Unix milliseconds, for computing countdown timers."
    },
    "arrivals": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "routeShortName": {
            "type": "string",
            "description": "Route short name (e.g. \"44\")."
          },
          "tripHeadsign": {
            "type": "string",
            "description": "Destination sign text (e.g. \"Downtown Seattle\")."
          },
          "predicted": {
            "type": "boolean",
            "description": "True if GPS-tracked real-time data is available; false if schedule-only."
          },
          "predictedArrivalTime": {
            "description": "Predicted arrival time as Unix milliseconds. Null when predicted=false.",
            "type": [
              "number",
              "null"
            ]
          },
          "scheduledArrivalTime": {
            "type": "number",
            "description": "Scheduled arrival time as Unix milliseconds."
          },
          "scheduleDeviation": {
            "type": "number",
            "description": "Seconds late (positive) or early (negative). Only meaningful when predicted=true."
          },
          "vehicleId": {
            "description": "Vehicle ID if known, or null.",
            "type": [
              "string",
              "null"
            ]
          },
          "vehiclePosition": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "lat": {
                    "type": "number",
                    "description": "Vehicle latitude."
                  },
                  "lon": {
                    "type": "number",
                    "description": "Vehicle longitude."
                  }
                },
                "required": [
                  "lat",
                  "lon"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Current vehicle position if available, or null."
          },
          "stopsAway": {
            "description": "Number of stops until this stop, or null if unknown.",
            "type": [
              "number",
              "null"
            ]
          },
          "tripId": {
            "type": "string",
            "description": "Trip ID for follow-up onebusaway_get_trip calls."
          },
          "routeId": {
            "type": "string",
            "description": "Route ID for follow-up route calls."
          },
          "situationIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of active service alerts affecting this arrival."
          }
        },
        "required": [
          "routeShortName",
          "tripHeadsign",
          "predicted",
          "predictedArrivalTime",
          "scheduledArrivalTime",
          "scheduleDeviation",
          "vehicleId",
          "vehiclePosition",
          "stopsAway",
          "tripId",
          "routeId",
          "situationIds"
        ],
        "additionalProperties": false,
        "description": "A single arrival or departure at this stop."
      },
      "description": "Arrivals and departures at this stop within the requested time window."
    },
    "situations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Situation ID."
          },
          "summary": {
            "type": "string",
            "description": "Short summary of the service alert."
          },
          "description": {
            "description": "Longer description of the service alert, or null.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "summary",
          "description"
        ],
        "additionalProperties": false,
        "description": "A single active service alert."
      },
      "description": "Active service alerts referenced by arrivals at this stop."
    },
    "queriedStop": {
      "type": "string",
      "description": "Stop ID queried."
    },
    "count": {
      "type": "number",
      "description": "Number of arrivals in the time window."
    },
    "windowMinutes": {
      "type": "object",
      "properties": {
        "before": {
          "type": "number",
          "description": "Minutes before current time included."
        },
        "after": {
          "type": "number",
          "description": "Minutes after current time included."
        }
      },
      "required": [
        "before",
        "after"
      ],
      "additionalProperties": false,
      "description": "Time window used for the arrivals query."
    },
    "notice": {
      "description": "Guidance when no arrivals were found — e.g. try expanding the time window or check for service alerts.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "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.",
              "examples": [
                "stop_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "stopId",
        "stopName",
        "currentTime",
        "arrivals",
        "situations",
        "queriedStop",
        "count",
        "windowMinutes"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_get_alert(situationId)

Fetch full detail for a service alert (situation) by ID. Returns the summary, description, reason (e.g. detour, construction), affected stops and routes, consequence description, and active time windows. Situation IDs appear in onebusaway_get_arrivals responses under situationIds and situations[].id.

Input Schema

{
  "type": "object",
  "properties": {
    "situationId": {
      "type": "string",
      "minLength": 1,
      "description": "Situation/alert ID from onebusaway_get_arrivals (situations[].id or arrivals[].situationIds[])."
    }
  },
  "required": [
    "situationId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Situation ID."
    },
    "summary": {
      "type": "string",
      "description": "Short summary of the service alert."
    },
    "description": {
      "description": "Longer description of the alert, or null.",
      "type": [
        "string",
        "null"
      ]
    },
    "reason": {
      "description": "Reason code from TPEG: equipmentReason, environmentReason, personnelReason, miscellaneousReason, securityAlert. Null when not provided.",
      "type": [
        "string",
        "null"
      ]
    },
    "severity": {
      "description": "Severity level as reported by the agency, or null.",
      "type": [
        "string",
        "null"
      ]
    },
    "consequenceMessage": {
      "description": "Human-readable consequence description (e.g. \"Detour in effect\"), or null.",
      "type": [
        "string",
        "null"
      ]
    },
    "affects": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "agencyId": {
            "description": "Affected agency ID, if scoped to an agency.",
            "type": "string"
          },
          "routeId": {
            "description": "Affected route ID, if scoped to a route.",
            "type": "string"
          },
          "stopId": {
            "description": "Affected stop ID, if scoped to a stop.",
            "type": "string"
          },
          "tripId": {
            "description": "Affected trip ID, if scoped to a trip.",
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "An entity affected by this alert."
      },
      "description": "Stops, routes, trips, or agencies affected by this alert."
    },
    "consequences": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "condition": {
            "description": "Consequence condition (e.g. \"detour\", \"reducedService\").",
            "type": "string"
          },
          "diversionStopIds": {
            "description": "Stop IDs on the diversion path, when condition is \"detour\".",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false,
        "description": "A consequence of this alert."
      },
      "description": "Operational consequences of this alert."
    },
    "activeWindows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "from": {
            "description": "Start of active window as Unix milliseconds, if known.",
            "type": "number"
          },
          "to": {
            "description": "End of active window as Unix milliseconds, if known.",
            "type": "number"
          }
        },
        "additionalProperties": false,
        "description": "A time window during which this alert is active."
      },
      "description": "Time windows when this alert is active."
    },
    "url": {
      "description": "URL for more information about this alert, or null.",
      "type": [
        "string",
        "null"
      ]
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `situation_not_found`: Situation 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.",
              "examples": [
                "situation_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "id",
        "summary",
        "description",
        "reason",
        "severity",
        "consequenceMessage",
        "affects",
        "consequences",
        "activeWindows",
        "url"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_get_trip(tripId, serviceDateMs, includeSchedule)

Real-time status and stop sequence for a trip. Returns vehicle position, schedule deviation, current phase, and remaining stops. Use tripId from onebusaway_get_arrivals to look up a specific vehicle's progress.

Input Schema

{
  "type": "object",
  "properties": {
    "tripId": {
      "type": "string",
      "minLength": 1,
      "description": "Trip ID from an arrivals response or schedule lookup."
    },
    "serviceDateMs": {
      "description": "Service date as Unix milliseconds (midnight local time). Only needed for trips from a previous service day. Omit to use today.",
      "type": "number"
    },
    "includeSchedule": {
      "default": true,
      "description": "Whether to include the full stop sequence with times. Defaults to true.",
      "type": "boolean"
    }
  },
  "required": [
    "tripId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "tripId": {
      "type": "string",
      "description": "The queried trip ID."
    },
    "routeShortName": {
      "type": "string",
      "description": "Route short name (e.g. \"44\")."
    },
    "tripHeadsign": {
      "type": "string",
      "description": "Destination sign text."
    },
    "blockId": {
      "description": "Block ID grouping this trip with the others the same vehicle runs back-to-back. Pass to onebusaway_get_block for the full block schedule. Null when the trip has no block.",
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "object",
      "properties": {
        "phase": {
          "type": "string",
          "description": "Current journey phase (e.g. \"in_progress\", \"layover_before\", \"layover_during\")."
        },
        "predicted": {
          "type": "boolean",
          "description": "True if GPS-tracked real-time data is available."
        },
        "position": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number",
                  "description": "Vehicle latitude."
                },
                "lon": {
                  "type": "number",
                  "description": "Vehicle longitude."
                }
              },
              "required": [
                "lat",
                "lon"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Current vehicle position if available, or null."
        },
        "scheduleDeviation": {
          "type": "number",
          "description": "Seconds late (positive) or early (negative)."
        },
        "nextStop": {
          "description": "Stop ID of the next stop, or null.",
          "type": [
            "string",
            "null"
          ]
        },
        "closestStop": {
          "description": "Stop ID of the closest stop, or null.",
          "type": [
            "string",
            "null"
          ]
        },
        "vehicleId": {
          "description": "Vehicle ID if known, or null.",
          "type": [
            "string",
            "null"
          ]
        },
        "lastUpdateTime": {
          "type": "number",
          "description": "Timestamp of the last real-time update as Unix milliseconds."
        }
      },
      "required": [
        "phase",
        "predicted",
        "position",
        "scheduleDeviation",
        "nextStop",
        "closestStop",
        "vehicleId",
        "lastUpdateTime"
      ],
      "additionalProperties": false,
      "description": "Real-time status of the trip."
    },
    "schedule": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "stopId": {
                "type": "string",
                "description": "Stop ID."
              },
              "stopName": {
                "type": "string",
                "description": "Stop name."
              },
              "arrivalTime": {
                "type": "number",
                "description": "Scheduled arrival time as seconds from midnight (GTFS format)."
              },
              "departureTime": {
                "type": "number",
                "description": "Scheduled departure time as seconds from midnight (GTFS format)."
              },
              "distanceAlongTripMeters": {
                "type": "number",
                "description": "Distance along the trip to this stop, in meters."
              }
            },
            "required": [
              "stopId",
              "stopName",
              "arrivalTime",
              "departureTime",
              "distanceAlongTripMeters"
            ],
            "additionalProperties": false,
            "description": "A scheduled stop time along this trip."
          }
        },
        {
          "type": "null"
        }
      ],
      "description": "Full stop sequence with times, or null if includeSchedule=false."
    },
    "situations": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Active situation IDs affecting this trip."
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `trip_not_found`: Trip ID not found or not active for the service date. `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.",
              "examples": [
                "trip_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "tripId",
        "routeShortName",
        "tripHeadsign",
        "blockId",
        "status",
        "schedule",
        "situations"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_get_block(blockId)

Fetch the full-day block schedule for a vehicle by block ID. A block is the ordered sequence of trips a single vehicle makes in one service day. Returns all trips in order with their stop times. Useful for 'when will this bus return?' and fleet tracking. Block IDs appear in onebusaway_get_trip responses under the schedule block field; obtain a tripId from onebusaway_get_arrivals first.

Input Schema

{
  "type": "object",
  "properties": {
    "blockId": {
      "type": "string",
      "minLength": 1,
      "description": "Block ID from a trip record. Obtain a tripId from onebusaway_get_arrivals, then call onebusaway_get_trip to get the blockId."
    }
  },
  "required": [
    "blockId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "blockId": {
      "type": "string",
      "description": "Block ID."
    },
    "activeServiceIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Service calendar IDs active for this block today."
    },
    "inactiveServiceIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Service calendar IDs not active for this block today."
    },
    "trips": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tripId": {
            "type": "string",
            "description": "Trip ID for follow-up onebusaway_get_trip calls."
          },
          "distanceAlongBlock": {
            "type": "number",
            "description": "Cumulative distance (meters) from block start to the first stop of this trip."
          },
          "accumulatedSlackTime": {
            "type": "number",
            "description": "Accumulated layover/slack time (seconds) before this trip starts."
          },
          "blockStopTimes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stopId": {
                  "type": "string",
                  "description": "Stop ID."
                },
                "arrivalTime": {
                  "type": "number",
                  "description": "Scheduled arrival time as seconds from midnight (GTFS format)."
                },
                "departureTime": {
                  "type": "number",
                  "description": "Scheduled departure time as seconds from midnight (GTFS format)."
                },
                "pickupType": {
                  "description": "GTFS pickup type (0=regular, 1=no pickup, 2=phone agency, 3=coordinate with driver).",
                  "type": "number"
                },
                "dropOffType": {
                  "description": "GTFS drop-off type (0=regular, 1=no dropoff, 2=phone agency, 3=coordinate with driver).",
                  "type": "number"
                }
              },
              "required": [
                "stopId",
                "arrivalTime",
                "departureTime"
              ],
              "additionalProperties": false,
              "description": "A scheduled stop time within this trip."
            },
            "description": "Ordered stop times for this trip."
          }
        },
        "required": [
          "tripId",
          "distanceAlongBlock",
          "accumulatedSlackTime",
          "blockStopTimes"
        ],
        "additionalProperties": false,
        "description": "A trip in this vehicle block."
      },
      "description": "All trips in this block in order."
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `block_not_found`: Block 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.",
              "examples": [
                "block_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "blockId",
        "activeServiceIds",
        "inactiveServiceIds",
        "trips"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_get_vehicles(agencyId, routeId)

Real-time positions of all active vehicles for an agency. Optionally filter to a single route (client-side). Returns GPS coordinates, heading, schedule deviation, and current trip. Useful for "where are all the buses on route X right now?" Use agencyId values from onebusaway_list_agencies.

Input Schema

{
  "type": "object",
  "properties": {
    "agencyId": {
      "type": "string",
      "minLength": 1,
      "description": "Agency ID (e.g. \"1\" for Metro Transit, \"40\" for Sound Transit). Use onebusaway_list_agencies to discover IDs."
    },
    "routeId": {
      "description": "Optional agency-prefixed route ID to filter results to one route. Filtering is client-side — all agency vehicles are fetched first.",
      "type": "string"
    }
  },
  "required": [
    "agencyId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "vehicles": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "vehicleId": {
            "type": "string",
            "description": "Vehicle ID."
          },
          "tripId": {
            "description": "Current trip ID, or null if not on a trip.",
            "type": [
              "string",
              "null"
            ]
          },
          "routeId": {
            "description": "Current route ID, or null.",
            "type": [
              "string",
              "null"
            ]
          },
          "routeShortName": {
            "description": "Route short name, or null.",
            "type": [
              "string",
              "null"
            ]
          },
          "tripHeadsign": {
            "description": "Destination sign text, or null.",
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number",
                "description": "Vehicle latitude."
              },
              "lon": {
                "type": "number",
                "description": "Vehicle longitude."
              }
            },
            "required": [
              "lat",
              "lon"
            ],
            "additionalProperties": false,
            "description": "Current GPS position."
          },
          "lastUpdateTime": {
            "type": "number",
            "description": "Timestamp of the last position update as Unix milliseconds."
          },
          "phase": {
            "type": "string",
            "description": "Current journey phase (e.g. \"in_progress\", \"layover_before\")."
          },
          "scheduleDeviation": {
            "description": "Seconds late (positive) or early (negative), or null.",
            "type": [
              "number",
              "null"
            ]
          },
          "orientation": {
            "description": "Heading in degrees (0=north, 90=east), or null.",
            "type": [
              "number",
              "null"
            ]
          },
          "nextStop": {
            "description": "Stop ID of the next stop, or null.",
            "type": [
              "string",
              "null"
            ]
          },
          "predicted": {
            "type": "boolean",
            "description": "True if this vehicle is reporting real-time GPS data."
          }
        },
        "required": [
          "vehicleId",
          "tripId",
          "routeId",
          "routeShortName",
          "tripHeadsign",
          "position",
          "lastUpdateTime",
          "phase",
          "scheduleDeviation",
          "orientation",
          "nextStop",
          "predicted"
        ],
        "additionalProperties": false,
        "description": "A real-time vehicle position entry."
      },
      "description": "Active vehicles for the agency, optionally filtered by route."
    },
    "limitExceeded": {
      "type": "boolean",
      "description": "True if the upstream capped the vehicle list — some vehicles were omitted. This endpoint has no pagination to retrieve them."
    },
    "agencyId": {
      "type": "string",
      "description": "Agency ID queried."
    },
    "routeId": {
      "description": "Route ID filter applied client-side, if any.",
      "type": "string"
    },
    "count": {
      "type": "number",
      "description": "Number of vehicles returned after any route filter."
    },
    "notice": {
      "description": "Guidance when no vehicles were found — e.g. the route may not be currently active, or the agency may not have real-time data.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `agency_not_found`: Agency 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.",
              "examples": [
                "agency_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "vehicles",
        "limitExceeded",
        "agencyId",
        "count"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_get_schedule_for_stop(stopId, date)

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

{
  "type": "object",
  "properties": {
    "stopId": {
      "type": "string",
      "minLength": 1,
      "description": "Agency-prefixed stop ID (e.g. \"1_75403\"). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs."
    },
    "date": {
      "description": "ISO 8601 date (e.g. \"2026-05-23\"). Defaults to today in the agency's timezone.",
      "type": "string"
    }
  },
  "required": [
    "stopId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "stopId": {
      "type": "string",
      "description": "The queried stop ID."
    },
    "stopName": {
      "type": "string",
      "description": "Stop name."
    },
    "serviceDateMs": {
      "type": "number",
      "description": "Service date as Unix milliseconds (start of service day)."
    },
    "routes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "routeId": {
            "type": "string",
            "description": "Route ID for follow-up onebusaway_get_route or onebusaway_get_schedule_for_route calls."
          },
          "routeShortName": {
            "type": "string",
            "description": "Route short name."
          },
          "directions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tripHeadsign": {
                  "type": "string",
                  "description": "Destination sign text."
                },
                "departures": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "scheduledDepartureTime": {
                        "type": "number",
                        "description": "Scheduled departure time as Unix milliseconds."
                      },
                      "tripId": {
                        "type": "string",
                        "description": "Trip ID for follow-up onebusaway_get_trip calls."
                      }
                    },
                    "required": [
                      "scheduledDepartureTime",
                      "tripId"
                    ],
                    "additionalProperties": false,
                    "description": "A single scheduled departure."
                  },
                  "description": "All departures for this direction."
                }
              },
              "required": [
                "tripHeadsign",
                "departures"
              ],
              "additionalProperties": false,
              "description": "A service direction at this stop."
            },
            "description": "Service directions for this route at this stop."
          }
        },
        "required": [
          "routeId",
          "routeShortName",
          "directions"
        ],
        "additionalProperties": false,
        "description": "A route with its scheduled departures from this stop."
      },
      "description": "All routes with departures from this stop on this date."
    },
    "queriedStop": {
      "type": "string",
      "description": "Stop ID queried."
    },
    "date": {
      "description": "Date parameter used for the schedule request, if specified.",
      "type": "string"
    },
    "routeCount": {
      "type": "number",
      "description": "Number of routes with departures from this stop on this date."
    },
    "notice": {
      "description": "Guidance when no routes were found — e.g. no service on weekends or holiday schedule in effect.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "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.",
              "examples": [
                "stop_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "stopId",
        "stopName",
        "serviceDateMs",
        "routes",
        "queriedStop",
        "routeCount"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢onebusaway_get_schedule_for_route(routeId, date)

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

{
  "type": "object",
  "properties": {
    "routeId": {
      "type": "string",
      "minLength": 1,
      "description": "Agency-prefixed route ID (e.g. \"1_100259\"). Use onebusaway_find_routes or onebusaway_search_routes to discover IDs."
    },
    "date": {
      "description": "ISO 8601 date (e.g. \"2026-05-23\"). Defaults to today.",
      "type": "string"
    }
  },
  "required": [
    "routeId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "routeId": {
      "type": "string",
      "description": "The queried route ID."
    },
    "routeShortName": {
      "type": "string",
      "description": "Route short name."
    },
    "serviceDateMs": {
      "type": "number",
      "description": "Service date as Unix milliseconds."
    },
    "trips": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tripId": {
            "type": "string",
            "description": "Trip ID for follow-up onebusaway_get_trip calls."
          },
          "tripHeadsign": {
            "type": "string",
            "description": "Destination sign text."
          },
          "serviceId": {
            "type": "string",
            "description": "Service calendar ID."
          },
          "stops": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stopId": {
                  "type": "string",
                  "description": "Stop ID."
                },
                "stopName": {
                  "type": "string",
                  "description": "Stop name."
                },
                "arrivalTime": {
                  "type": "number",
                  "description": "Scheduled arrival time as seconds from midnight (GTFS format)."
                },
                "departureTime": {
                  "type": "number",
                  "description": "Scheduled departure time as seconds from midnight (GTFS format)."
                }
              },
              "required": [
                "stopId",
                "stopName",
                "arrivalTime",
                "departureTime"
              ],
              "additionalProperties": false,
              "description": "A stop time along this trip."
            },
            "description": "Stop sequence for this trip."
          }
        },
        "required": [
          "tripId",
          "tripHeadsign",
          "serviceId",
          "stops"
        ],
        "additionalProperties": false,
        "description": "A single trip with its scheduled stop sequence."
      },
      "description": "All trips for this route on this date, with their stop sequences."
    },
    "queriedRoute": {
      "type": "string",
      "description": "Route ID queried."
    },
    "date": {
      "description": "Date parameter used for the schedule request, if specified.",
      "type": "string"
    },
    "tripCount": {
      "type": "number",
      "description": "Number of trips for this route on this date."
    },
    "notice": {
      "description": "Guidance when no trips were found — e.g. no service on weekends or holiday schedule in effect.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "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.",
              "examples": [
                "route_not_found",
                "rate_limited"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "routeId",
        "routeShortName",
        "serviceDateMs",
        "trips",
        "queriedRoute",
        "tripCount"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}

Community

Rate this Server

Evidence

Recent observations

verifiedversion not recorded15 tools
verifiedversion not recorded15 tools