Skip to main content
Glama

Search Agencies

search_agencies
Read-onlyIdempotent

Search transit agencies/operators by name or geo. Operators are the entities running services.

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": {},
    "name": "search_agencies"
  }
}

Input Schema

NameRequiredDescriptionDefault
latNoLatitude (with radius_m + lon)
lonNoLongitude
limitNo1-100 (default 20)
queryNoFree-text search by agency/operator name (e.g. "BART", "MTA")
radius_mNoSearch radius in meters (default 1000)
agency_idNoGTFS agency_id

Output Schema

NameRequiredDescriptionDefault
metaNo
agenciesNoList of matching agencies

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedOutput schema / properties / agencies / items / properties / agency_id / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / agencies / items / properties / agency_lang / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / agencies / items / properties / agency_phone / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / agencies / items / properties / geometry / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / agencies / items / properties / places / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
  2. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "name": "Bay Area Rapid Transit"
      -  },
      -  {
      -    "lat": 37.7749,
      -    "limit": 10,
      -    "lon": -122.4194,
      -    "radius_m": 5000
      -  }
      -]New value: +[
      +  {},
      +  {
      +    "lat": 37.7749,
      +    "limit": 10,
      +    "lon": -122.4194,
      +    "radius_m": 5000
      +  }
      +]
  3. Changed2 schema fields changed
    • removedInput schema / properties / name
      Removed value: -{
      -  "description": "Free-text agency name filter",
      -  "type": "string"
      -}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Free-text search by agency/operator name (e.g. \"BART\", \"MTA\")",
      +  "type": "string"
      +}
  4. Changed20 schema fields changed
    • addedOutput schema / properties / agencies / items / properties / agency_email
      Added value: +{
      +  "type": "null"
      +}
    • addedOutput schema / properties / agencies / items / properties / agency_fare_url
      Added value: +{
      +  "type": "null"
      +}
    • addedOutput schema / properties / agencies / items / properties / agency_lang
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / agencies / items / properties / agency_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / agencies / items / properties / agency_phone
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / agencies / items / properties / agency_timezone
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / agencies / items / properties / agency_url
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / agencies / items / properties / email
      Removed value: -{
      -  "description": "Contact email",
      -  "type": "string"
      -}
    • addedOutput schema / properties / agencies / 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"
      +}
    • addedOutput schema / properties / agencies / items / properties / geometry / properties
      Added value: +{
      +  "coordinates": {
      +    "items": {
      +      "items": {
      +        "items": {
      +          "type": "number"
      +        },
      +        "type": "array"
      +      },
      +      "type": "array"
      +    },
      +    "type": "array"
      +  },
      +  "type": {
      +    "type": "string"
      +  }
      +}
    • changedOutput schema / properties / agencies / items / properties / id / type
      Previous value: -"string"New value: +"number"
    • removedOutput schema / properties / agencies / items / properties / language
      Removed value: -{
      -  "description": "ISO language code",
      -  "type": "string"
      -}
    • removedOutput schema / properties / agencies / items / properties / name
      Removed value: -{
      -  "description": "Agency name",
      -  "type": "string"
      -}
    • addedOutput schema / properties / agencies / items / properties / onestop_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / agencies / items / properties / operator
      Added value: +{
      +  "properties": {
      +    "feeds": {
      +      "items": {
      +        "properties": {
      +          "id": {
      +            "type": "number"
      +          },
      +          "name": {
      +            "type": "null"
      +          },
      +          "onestop_id": {
      +            "type": "string"
      +          },
      +          "spec": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "onestop_id": {
      +      "type": "string"
      +    },
      +    "short_name": {
      +      "type": [
      +        "null",
      +        "string"
      +      ]
      +    },
      +    "tags": {
      +      "type": "null"
      +    }
      +  },
      +  "type": "object"
      +}
    • removedOutput schema / properties / agencies / items / properties / phone
      Removed value: -{
      -  "description": "Contact phone number",
      -  "type": "string"
      -}
    • addedOutput schema / properties / agencies / items / properties / places
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "adm0_name": {
      +        "type": "string"
      +      },
      +      "adm1_name": {
      +        "type": "string"
      +      },
      +      "city_name": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / agencies / items / properties / timezone
      Removed value: -{
      -  "description": "IANA timezone",
      -  "type": "string"
      -}
    • removedOutput schema / properties / agencies / items / properties / url
      Removed value: -{
      -  "description": "Agency website URL",
      -  "type": "string"
      -}
    • addedOutput schema / properties / meta
      Added value: +{
      +  "properties": {
      +    "after": {
      +      "type": "number"
      +    },
      +    "next": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "name": "Bay Area Rapid Transit"
      +  },
      +  {
      +    "lat": 37.7749,
      +    "limit": 10,
      +    "lon": -122.4194,
      +    "radius_m": 5000
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Search results for transit agencies/operators",
      +  "properties": {
      +    "agencies": {
      +      "description": "List of matching agencies",
      +      "items": {
      +        "properties": {
      +          "agency_id": {
      +            "description": "GTFS agency_id",
      +            "type": "string"
      +          },
      +          "email": {
      +            "description": "Contact email",
      +            "type": "string"
      +          },
      +          "geometry": {
      +            "description": "GeoJSON geometry",
      +            "type": "object"
      +          },
      +          "id": {
      +            "description": "Transitland onestop_id",
      +            "type": "string"
      +          },
      +          "language": {
      +            "description": "ISO language code",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Agency name",
      +            "type": "string"
      +          },
      +          "phone": {
      +            "description": "Contact phone number",
      +            "type": "string"
      +          },
      +          "timezone": {
      +            "description": "IANA timezone",
      +            "type": "string"
      +          },
      +          "url": {
      +            "description": "Agency website URL",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  6. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint false. The description adds minimal behavioral context beyond a domain clarification ('Operators are the entities running services'). No additional behavior like pagination or filtering is disclosed, but annotations cover the safety profile.

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?

Two sentences with zero waste. The purpose is front-loaded and the domain clarification is a single clause. No redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the annotations cover safety, the schema fully describes parameters, and an output schema exists, the description is complete for correct invocation. Nothing essential 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%, with each parameter having a description and example. The description mentions 'by name or geo' which aligns with query and lat/lon parameters but adds no additional semantic detail beyond the schema. Baseline 3 applies.

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?

Description states a specific verb 'Search' with resource 'transit agencies/operators' and method 'by name or geo'. It also clarifies the domain with 'Operators are the entities running services', distinguishing from sibling search tools like search_routes 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 Guidelines4/5

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

The description implies when to use this tool (searching agencies/operators by name or geo) but does not explicitly exclude alternatives. Sibling names provide context, but the description lacks explicit when-not-to-use guidance. It is clear enough for an agent to infer the context.

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.