Skip to main content
Glama

Search Stops by Name or Code

onebusaway_search_stops
Read-only

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

TableJSON Schema
NameRequiredDescriptionDefault
queryYesStop name fragment or stop code (e.g. "University Way" or "75403").
maxCountNoMaximum number of results to return. A positive integer, at most 100. Defaults to 10.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe maxCount limit applied to truncated results.
countNoNumber of stops returned.
errorNoPresent when the call failed. Absent on success.
queryNoSearch query sent to the API.
shownNoNumber of stops returned when results were truncated.
stopsNoStops matching the search query.
noticeNoGuidance when no stops matched — e.g. try a different name fragment or use onebusaway_find_stops with coordinates.
truncatedNoTrue when matching stops exceeded maxCount.
limitExceededNoTrue if more stops match than were returned; raise maxCount or refine the query 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. Changed9 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",
      +      "query",
      +      "count"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The maxCount limit applied to truncated results.",
      +  "type": "number"
      +}
    • 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"
      +}
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Number of stops returned when results were truncated.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when matching stops exceeded maxCount.",
      +  "type": "boolean"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "stops",
      -  "limitExceeded",
      -  "query",
      -  "count"
      -]
  3. Changed6 schema fields changed
    • changedInput schema / properties / maxCount / description
      Previous value: -"Maximum number of results to return. Defaults to 10."New value: +"Maximum number of results to return. A positive integer, at most 100. Defaults to 10."
    • addedInput schema / properties / maxCount / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / maxCount / maximum
      Added value: +100
    • changedInput schema / properties / maxCount / type
      Previous value: -"number"New value: +"integer"
    • addedOutput schema / properties / limitExceeded
      Added value: +{
      +  "description": "True if more stops match than were returned; raise maxCount or refine the query to see all.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "stops",
      -  "query",
      -  "count"
      -]New value: +[
      +  "stops",
      +  "limitExceeded",
      +  "query",
      +  "count"
      +]
  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 no stops matched — e.g. try a different name fragment or use onebusaway_find_stops with coordinates.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / query
      Added value: +{
      +  "description": "Search query sent to the API.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "stops"
      -]New value: +[
      +  "stops",
      +  "query",
      +  "count"
      +]
  5. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safe-read nature is externally known. The description adds useful behavioral detail by noting the return contains IDs and coordinateschers. It does not cover edge cases like ambiguous matches or pagination behavior, but given the annotation coverage this 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?

Three short sentences, each earning its place: what it searches, what it returns, and why you would use it. The main action is front-loaded 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?

For a simple two-parameter search tool with a complete input schema, an output schema, and readOnly annotations, this description covers the essentials: matching criteria, return contents, and the typical call flow. It could add a hint about what happens when no matches are found, but nothing critical is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so both 'query' and 'maxCount' are fully documented in the schema. The description adds the semantic context that the query can be a stop name fragment or stop code, but the schema already conveys this. Baseline 3 is appropriate.

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

Purpose5/5

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

The description uses a specific verb ('search') targeting a clear resource ('stops') and specifies the matching criteria ('by name or code'). It further states the output ('IDs and coordinates') and the intended downstream use, making the tool's purpose unambiguous and distinguishable from the broader sibling set.

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 explicitly states when to use the tool: to resolve a human-readable stop name or number to a stop ID for arrivals lookups with onebusaway_get_arrivals. This gives clear usage context, though it does not explicitly exclude siblings like onebusaway_find_stops.

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.