Skip to main content
Glama

Search Routes

search_routes
Read-onlyIdempotent

Search public transit routes in Transitland, the global GTFS feed aggregator, by route name, GTFS route type, operating agency, or a lat/lon point with radius. Returns matching routes with short and long name, route type, operating agency and Transitland onestop_id. Answers which bus, tram, metro, rail or ferry lines serve a place or belong to an operator. route_type: 0=tram, 1=metro, 2=rail, 3=bus, 4=ferry, 5=cable_tram, 6=aerial_lift, 7=funicular, 11=trolleybus, 12=monorail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latNo
lonNo
limitNo
queryNoFree-text search by route name/long name
radius_mNo
agency_idNo
route_typeNoGTFS route_type code
operator_idNoTransitland operator onestop_id

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaNo
routesNoList of matching routes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "name": "Express",
      -    "route_type": 3
      -  },
      -  {
      -    "lat": 37.7749,
      -    "lon": -122.4194,
      -    "operator_id": "o-9q8yvz-bart",
      -    "radius_m": 2000
      -  }
      -]New value: +[
      +  {
      +    "route_type": 3
      +  },
      +  {
      +    "lat": 37.7749,
      +    "lon": -122.4194,
      +    "operator_id": "o-9q8yvz-bart",
      +    "radius_m": 2000
      +  }
      +]
  2. Changed2 schema fields changed
    • removedInput schema / properties / name
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Free-text search by route name/long name",
      +  "type": "string"
      +}
  3. Changed18 schema fields changed
    • addedOutput schema / properties / meta
      Added value: +{
      +  "properties": {
      +    "after": {
      +      "type": "number"
      +    },
      +    "next": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / routes / items / properties / agency / properties
      Added value: +{
      +  "agency_id": {
      +    "type": "string"
      +  },
      +  "agency_name": {
      +    "type": "string"
      +  },
      +  "id": {
      +    "type": "number"
      +  },
      +  "onestop_id": {
      +    "type": "string"
      +  }
      +}
    • removedOutput schema / properties / routes / items / properties / color
      Removed value: -{
      -  "description": "Route color (hex)",
      -  "type": "string"
      -}
    • addedOutput schema / properties / routes / items / properties / continuous_drop_off
      Added value: +{
      +  "type": "null"
      +}
    • addedOutput schema / properties / routes / items / properties / continuous_pickup
      Added value: +{
      +  "type": "null"
      +}
    • addedOutput schema / properties / routes / items / properties / feed_version
      Added value: +{
      +  "properties": {
      +    "feed": {
      +      "properties": {
      +        "id": {
      +          "type": "number"
      +        },
      +        "onestop_id": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "fetched_at": {
      +      "type": "string"
      +    },
      +    "id": {
      +      "type": "number"
      +    },
      +    "sha1": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • removedOutput schema / properties / routes / items / properties / geometry
      Removed value: -{
      -  "description": "GeoJSON geometry",
      -  "type": "object"
      -}
    • changedOutput schema / properties / routes / items / properties / id / type
      Previous value: -"string"New value: +"number"
    • removedOutput schema / properties / routes / items / properties / name
      Removed value: -{
      -  "description": "Route name/number",
      -  "type": "string"
      -}
    • addedOutput schema / properties / routes / items / properties / onestop_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / routes / items / properties / route_color
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / routes / items / properties / route_desc
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / routes / items / properties / route_long_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / routes / items / properties / route_short_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / routes / items / properties / route_sort_order
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / routes / items / properties / route_text_color
      Added value: +{
      +  "type": "null"
      +}
    • addedOutput schema / properties / routes / items / properties / route_url
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / routes / items / properties / text_color
      Removed value: -{
      -  "description": "Route text color (hex)",
      -  "type": "string"
      -}
  4. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "name": "Express",
      +    "route_type": 3
      +  },
      +  {
      +    "lat": 37.7749,
      +    "lon": -122.4194,
      +    "operator_id": "o-9q8yvz-bart",
      +    "radius_m": 2000
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Search results for transit routes",
      +  "properties": {
      +    "routes": {
      +      "description": "List of matching routes",
      +      "items": {
      +        "properties": {
      +          "agency": {
      +            "description": "Operator/agency details",
      +            "type": "object"
      +          },
      +          "color": {
      +            "description": "Route color (hex)",
      +            "type": "string"
      +          },
      +          "geometry": {
      +            "description": "GeoJSON geometry",
      +            "type": "object"
      +          },
      +          "id": {
      +            "description": "Transitland onestop_id",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Route name/number",
      +            "type": "string"
      +          },
      +          "route_id": {
      +            "description": "GTFS route_id",
      +            "type": "string"
      +          },
      +          "route_type": {
      +            "description": "GTFS route_type code",
      +            "type": "number"
      +          },
      +          "text_color": {
      +            "description": "Route text color (hex)",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  5. First observed

TDQS

A3.9/5.0
Behavior3/5

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

The annotations already convey read-only, open-world, and non-destructive behavior. The description adds return field details and the route_type mapping, but it does not disclose additional behavioral traits such as pagination, limits, or behaviors when no parameters are provided. Given the annotation coverage, the description adds moderate context but not the richness seen in top-tier descriptions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four sentences, each contributing useful information: the search action, return fields, use case, and parameter enumeration. It is front-loaded with the core purpose and does not include redundant phrasing. The route_type list is lengthy but directly supports effective use of the tool.

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 8 parameters, an output schema, and clear annotations, the description is quite complete for a search tool. It covers the primary search criteria, return values, and route_type codes. The main gap is ambiguity around agency_id versus operator_id and the behavior of the limit parameter, but the overall context is sufficient for an agent to invoke it correctly.

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?

With only 38% schema description coverage, the description partially compensates by explaining that search can be done by 'lat/lon point with radius' and by enumerating route_type codes. However, it does not clarify the difference between agency_id and operator_id, nor explain the limit parameter. It adds some meaning but leaves gaps for undocumented parameters.

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 clearly states the tool searches public transit routes in Transitland, listing specific search criteria (name, route type, agency, lat/lon with radius). It distinguishes itself from siblings like search_stops and search_agencies by targeting routes explicitly. The use case 'which bus, tram, metro, rail or ferry lines serve a place or belong to an operator' further clarifies the resource and intent.

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 provides clear context on when to use the tool by enumerating search dimensions and the type of questions it answers. It does not explicitly name alternative tools or state when not to use it, but the specificity of 'routes' and the example use case give enough guidance for an agent to select this tool over search_stops or search_agencies.

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.