Skip to main content
Glama

Find Stops Near Location

onebusaway_find_stops
Read-only

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

TableJSON Schema
NameRequiredDescriptionDefault
latYesLatitude of the search center, in [-90, 90].
lonYesLongitude of the search center, in [-180, 180].
queryNoOptional stop code filter (the number printed on the stop sign, e.g. "75403"). When provided, returns only stops matching this code within the radius.
radiusNoSearch radius in meters. Must be positive; capped at 1600m, beyond which results degrade. Defaults to 300m.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of stops returned.
errorNoPresent when the call failed. Absent on success.
queryNoStop code filter applied to the search, if any.
stopsNoStops within the search radius.
noticeNoGuidance when results are empty or truncated — e.g. how to narrow the radius or verify the stop code.
limitExceededNoTrue if more stops exist beyond the returned set; narrow the radius to see all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 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"
      +]
  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": [
      +      "stops",
      +      "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: -[
      -  "stops",
      -  "limitExceeded",
      -  "count"
      -]
  3. Changed9 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
    • 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
    • changedInput schema / properties / radius / description
      Previous value: -"Search radius in meters. Defaults to 300m. Max ~1600m before results degrade."New value: +"Search radius in meters. Must be positive; capped at 1600m, beyond which results degrade. Defaults to 300m."
    • addedInput schema / properties / radius / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / radius / maximum
      Added value: +1600
  4. Changed4 schema fields changed
    • addedOutput schema / properties / count
      Added value: +{
      +  "description": "Number of stops returned.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when results are empty or truncated — e.g. how to narrow the radius or verify the stop code.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / query
      Added value: +{
      +  "description": "Stop code filter applied to the search, if any.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "stops",
      -  "limitExceeded"
      -]New value: +[
      +  "stops",
      +  "limitExceeded",
      +  "count"
      +]
  5. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, and the description adds useful behavioral context about what results contain and how stopId values feed into onebusaway_get_arrivals. It does not cover edge cases like empty results or radius degradation, but for a read-only lookup with an output schema this is adequate.

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?

The description is three short sentences with the core action front-loaded, followed by the return-value summary and a practical follow-up hint. Every sentence adds useful information and there is no filler.

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?

Combined with the readOnlyHint annotation, fully described parameters, and output schema, the description provides enough context for an agent to call the tool correctly. The only missing comparative context is how this tool relates to onebusaway_search_stops, but the tool is otherwise self-contained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the description does not need to compensate for undocumented parameters. The description restates the stop-code filter meaning but adds no parameter semantics beyond what the schema already provides, which matches the baseline of 3.

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 opens with 'Find bus stops near a location' and adds 'Returns stops within a radius, each with ID, name, direction, served routes, and wheelchair boarding status,' giving a specific verb, resource, and scope. It does not explicitly distinguish itself from the sibling onebusaway_search_stops, so it falls just 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 Guidelines4/5

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

The description clearly states the tool's purpose and gives an explicit downstream instruction: 'Use stopId values from results to fetch real-time arrivals with onebusaway_get_arrivals.' It does not explain when to prefer this tool over onebusaway_search_stops or list exclusions, so it is clear but not fully exhaustive.

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.