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.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "route_type": 3
    },
    "name": "search_routes"
  }
}

Input 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

NameRequiredDescriptionDefault
metaNo
routesNoList of matching routes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed21 schema fields changed
    • changedOutput schema / properties / routes / items / properties / agency / properties / agency_id / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / agency / properties / agency_name / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / agency / properties / id / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / agency / properties / onestop_id / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / routes / items / properties / continuous_drop_off / description
      Added value: +"(type varies; observed both null and non-null)"
    • removedOutput schema / properties / routes / items / properties / continuous_drop_off / type
      Removed value: -"null"
    • addedOutput schema / properties / routes / items / properties / continuous_pickup / description
      Added value: +"(type varies; observed both null and non-null)"
    • removedOutput schema / properties / routes / items / properties / continuous_pickup / type
      Removed value: -"null"
    • changedOutput schema / properties / routes / items / properties / feed_version / properties / feed / properties / id / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / feed_version / properties / feed / properties / onestop_id / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / feed_version / properties / fetched_at / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / feed_version / properties / id / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / feed_version / properties / sha1 / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / route_color / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / route_desc / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / route_long_name / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / route_short_name / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / routes / items / properties / route_sort_order / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • addedOutput schema / properties / routes / items / properties / route_text_color / description
      Added value: +"(type varies; observed both null and non-null)"
    • removedOutput schema / properties / routes / items / properties / route_text_color / type
      Removed value: -"null"
    • changedOutput schema / properties / routes / items / properties / route_url / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  2. 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
      +  }
      +]
  3. 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"
      +}
  4. 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"
      -}
  5. 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"
      +}
  6. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld). The description usefully adds the return contract (short/long name, route type, operating agency, onestop_id), which is valuable context beyond annotations.

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?

Front-loaded purpose, then search facets, then return fields, then the route_type legend. The route_type enumeration is dense but earns its place given low schema coverage; otherwise no waste.

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?

Output schema exists, so return-value detail is redundant but welcome. Covers searchable facets and the critical route_type mapping. Would be a 5 if it clarified the agency_id vs operator_id relationship and limit/radius defaults.

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

Parameters4/5

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

Schema coverage is only 38%, so the description compensates by fully enumerating GTFS route_type codes (0-12), which is the highest-risk parameter. It also lists lat/lon/radius and operator search. Still doesn't explain agency_id vs operator_id distinction or limit semantics.

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?

States a specific verb (Search) and resource (public transit routes) with the domain (Transitland GTFS aggregator) plus the searchable facets. Clearly distinguishable from siblings like search_agencies and search_stops.

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 when to use it ('Answers which bus, tram, metro, rail or ferry lines serve a place or belong to an operator') but gives no explicit when-not or named alternative. Routing to search_agencies/search_stops is left to inference.

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.