Skip to main content
Glama

Find Routes Near Location

onebusaway_find_routes
Read-only

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

TableJSON Schema
NameRequiredDescriptionDefault
latYesLatitude of the search center, in [-90, 90].
lonYesLongitude of the search center, in [-180, 180].
queryNoFilter by route name or number (e.g. "44" or "Link Light Rail").
radiusNoSearch radius in meters. Must be positive; capped at 1600m. Defaults to 500m. Ignored when latSpan and lonSpan are both set.
latSpanNoOptional bounding-box height in degrees, as an alternative to radius. Takes effect only when lonSpan is also set, in which case radius is ignored.
lonSpanNoOptional bounding-box width in degrees, as an alternative to radius. Takes effect only when latSpan is also set, in which case radius is ignored.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of routes returned.
errorNoPresent when the call failed. Absent on success.
queryNoRoute name/number filter applied to the search, if any.
noticeNoGuidance when no routes matched — e.g. try a larger radius or different query.
routesNoRoutes found near the specified location.
limitExceededNoTrue if more routes exist beyond the returned set; narrow the radius or set latSpan/lonSpan to see all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode."New value: +"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."
    • addedOutput schema / properties / error / properties / data / properties / reason / examples
      Added value: +[
      +  "rate_limited"
      +]
    • removedOutput schema / properties / routes / items / properties / color / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / routes / items / properties / color / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / routes / items / properties / url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / routes / items / properties / url / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. 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": [
      +      "routes",
      +      "limitExceeded",
      +      "count"
      +    ]
      +  },
      +  {
      +    "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.",
      +          "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: -[
      -  "routes",
      -  "limitExceeded",
      -  "count"
      -]
  3. Changed13 schema fields changed
    • changedInput schema / properties / lat / description
      Previous value: -"Latitude of the search center."New value: +"Latitude of the search center, in [-90, 90]."
    • addedInput schema / properties / lat / maximum
      Added value: +90
    • addedInput schema / properties / lat / minimum
      Added value: +-90
    • addedInput schema / properties / latSpan
      Added value: +{
      +  "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.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / lon / description
      Previous value: -"Longitude of the search center."New value: +"Longitude of the search center, in [-180, 180]."
    • addedInput schema / properties / lon / maximum
      Added value: +180
    • addedInput schema / properties / lon / minimum
      Added value: +-180
    • addedInput schema / properties / lonSpan
      Added value: +{
      +  "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.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / radius / description
      Previous value: -"Search radius in meters. Defaults to 500m."New value: +"Search radius in meters. Must be positive; capped at 1600m. Defaults to 500m. Ignored when latSpan and lonSpan are both set."
    • addedInput schema / properties / radius / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / radius / maximum
      Added value: +1600
    • addedOutput schema / properties / limitExceeded
      Added value: +{
      +  "description": "True if more routes exist beyond the returned set; narrow the radius or set latSpan/lonSpan to see all.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "routes",
      -  "count"
      -]New value: +[
      +  "routes",
      +  "limitExceeded",
      +  "count"
      +]
  4. Changed4 schema fields changed
    • addedOutput schema / properties / count
      Added value: +{
      +  "description": "Number of routes returned.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when no routes matched — e.g. try a larger radius or different query.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / query
      Added value: +{
      +  "description": "Route name/number filter applied to the search, if any.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "routes"
      -]New value: +[
      +  "routes",
      +  "count"
      +]
  5. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, covering the safety profile. The description adds that routes can be filtered by name/number and returns IDs, short names, and descriptions, which is useful but not deeply behavioral. It does not discuss pagination, rate limits, or edge cases, but given the read-only annotation, the added context is acceptable.

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?

Two sentences, front-loaded with the primary purpose, and includes a concise follow-up hint. No wasted words or redundancy. The structure is efficient and scannable.

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?

Given the tool has 6 parameters (2 required) and a thorough schema, the description does not need to repeat parameter details. It states the return fields and hints at next steps. It does not mention the latSpan/lonSpan vs radius distinction, but the schema covers that. For a read-only search tool with a rich schema, this is largely complete.

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?

The schema description coverage is 100%, so all parameters are documented. The description's mention of 'optionally filtered by name or number' aligns with the query parameter but does not add new semantic depth beyond the schema. It also refers to routeId in output, not parameters. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Find' and the resource 'transit routes' with a location context. It mentions optional filtering and return fields, making the purpose specific. However, it does not explicitly name sibling tools like search_routes or list_routes_for_agency to differentiate when to use this versus them, so it stops short of a 5.

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

Usage Guidelines3/5

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

The description implies usage for location-based route discovery ('near a location') but does not explicitly state when not to use it or name alternative tools. It gives a follow-up hint to use routeId values, but that is about subsequent actions, not tool selection. No exclusions or alternative routing guidance is provided.

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.