Skip to main content
Glama

Search Routes by Name or Number

onebusaway_search_routes
Read-only

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

TableJSON Schema
NameRequiredDescriptionDefault
queryYesRoute name or number (e.g. "44", "Link", or "RapidRide").
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 routes returned.
errorNoPresent when the call failed. Absent on success.
queryNoRoute name/number query sent to the API.
shownNoNumber of routes returned when results were truncated.
noticeNoGuidance when no routes matched — e.g. try onebusaway_find_routes with coordinates, or onebusaway_list_routes_for_agency.
routesNoRoutes matching the search query.
truncatedNoTrue when matching routes exceeded maxCount.
limitExceededNoTrue if more routes 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. Declared by this tool: `endpoint_unavailable`: The search/route endpoint returns 404 on this OBA instance (e.g. Puget Sound). Other values are possible when a failure originates below the handler."New value: +"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."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "endpoint_unavailable"
      -]New value: +[
      +  "endpoint_unavailable",
      +  "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": [
      +      "routes",
      +      "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. Declared by this tool: `endpoint_unavailable`: The search/route endpoint returns 404 on this OBA instance (e.g. Puget Sound). Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "endpoint_unavailable"
      +          ],
      +          "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 routes returned when results were truncated.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when matching routes exceeded maxCount.",
      +  "type": "boolean"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "routes",
      -  "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 routes match than were returned; raise maxCount or refine the query to see all.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "routes",
      -  "query",
      -  "count"
      -]New value: +[
      +  "routes",
      +  "limitExceeded",
      +  "query",
      +  "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 onebusaway_find_routes with coordinates, or onebusaway_list_routes_for_agency.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / query
      Added value: +{
      +  "description": "Route name/number query sent to the API.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "routes"
      -]New value: +[
      +  "routes",
      +  "query",
      +  "count"
      +]
  5. First observed

TDQS

A3.8/5.0
Behavior3/5

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

The readOnlyHint annotation already communicates that this is a safe read operation. The description adds a useful context point about returning route IDs for follow-up lookups, but it does not disclose any additional behavioral details such as pagination, fuzzy matching, sorting, or case sensitivity. This is acceptable but not rich.

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 two sentences with no filler. The core action and output are front-loaded, and the use case is stated efficiently. Every sentence earns its place.

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 search tool with a read-only annotation, a complete output schema, and fully documented parameters, the description is nearly sufficient. It clearly connects the tool to a practical workflow. The only notable gap is the lack of guidance on how this tool relates to onebusaway_find_routes.

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%, and the schema already documents 'query' and 'maxCount' with examples and constraints. The description echoes the query concept but does not add meaning beyond the schema. Baseline 3 is appropriate because the schema carries the parameter documentation burden.

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 states a clear action ('Search for routes by name or number') and resource, and clarifies the output ('matching routes with IDs'). It differentiates from get_route and schedule/vehicle tools, but does not distinguish itself from the sibling onebusaway_find_routes, which appears to be a very similar operation.

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 says when to use the tool: to resolve a route short name like '44' to a route ID for downstream schedule or vehicle lookups. It names the intended follow-on tools, but it does not provide exclusions or explain when to prefer onebusaway_find_routes instead.

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.