Skip to main content
Glama

Get Stops Around Location

get_stops_around_location
Read-onlyIdempotent

Finds stops near a geographic point, returning each stop's numeric ID, name, coordinates, walking distance, and the routes serving it. Use this as the first step when the user gives an address or coordinates and you need stop IDs for get_stop_realtime or find_routes_between. Use search_stops instead when the user gives a stop name. Default radius is 1 000 m; narrow it (e.g. 300 m) for dense urban areas or widen it (up to 3 000 m) for rural locations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latitudeYesDecimal latitude of the search centre, WGS84 (e.g. 49.842 for central Lviv).
longitudeYesDecimal longitude of the search centre, WGS84 (e.g. 24.031 for central Lviv).
radius_metersNoSearch radius in metres (50–3000, default 1000). Use ~300 for dense urban intersections, up to 3000 for suburban or rural areas.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
viewYes
ui_blocksYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedOutput schema / properties / data / properties / stops / items / properties / routes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / data / properties / stops / items / required
      Previous value: -[
      -  "id",
      -  "name",
      -  "lat",
      -  "lng",
      -  "distance_meters"
      -]New value: +[
      +  "id",
      +  "name",
      +  "lat",
      +  "lng",
      +  "routes",
      +  "distance_meters"
      +]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / layers
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "polylines": {
      +      "type": "string"
      +    },
      +    "stops": {
      +      "type": "string"
      +    },
      +    "vehicles": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / stops
      Removed value: -{
      -  "items": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "distance_meters": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "id": {
      -        "type": "string"
      -      },
      -      "lat": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "lng": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "name": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "name",
      -      "lat",
      -      "lng",
      -      "distance_meters"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles
      Removed value: -{
      -  "items": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "bearing": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "eta_minutes": {
      -        "anyOf": [
      -          {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "eta_status": {
      -        "enum": [
      -          "assigned",
      -          "unassigned"
      -        ],
      -        "type": "string"
      -      },
      -      "id": {
      -        "type": "string"
      -      },
      -      "lat": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "lng": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "next_stop_id": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "route": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "route",
      -      "lat",
      -      "lng",
      -      "bearing",
      -      "next_stop_id",
      -      "eta_minutes",
      -      "eta_status"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • changedOutput schema / properties / ui_blocks / items / properties / data / required
      Previous value: -[
      -  "center",
      -  "zoom",
      -  "stops",
      -  "vehicles"
      -]New value: +[
      +  "center",
      +  "zoom",
      +  "layers"
      +]
  2. Changed34 schema fields changed
    • removedOutput schema / properties / data / properties / center_lat / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / data / properties / center_lat / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / center_lng / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / data / properties / center_lng / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / stops / items / properties / distance_meters / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / data / properties / stops / items / properties / distance_meters / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / stops / items / properties / lat / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / data / properties / stops / items / properties / lat / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / stops / items / properties / lng / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / data / properties / stops / items / properties / lng / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / stops / items / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / data / properties / stops / items / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / center / additionalItems
      Added value: +false
    • changedOutput schema / properties / ui_blocks / items / properties / data / properties / center / items
      Previous value: -[
      -  {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "type": [
      +      "number",
      +      "null"
      +    ]
      +  },
      +  {
      +    "type": [
      +      "number",
      +      "null"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / center / maxItems
      Added value: +2
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / center / minItems
      Added value: +2
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / stops / items / properties / distance_meters / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / stops / items / properties / distance_meters / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / stops / items / properties / lat / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / stops / items / properties / lat / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / stops / items / properties / lng / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / stops / items / properties / lng / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / stops / items / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / stops / items / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / bearing / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / bearing / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / lat / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / lat / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / lng / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / lng / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / next_stop_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / next_stop_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / route / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ui_blocks / items / properties / data / properties / vehicles / items / properties / route / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "center_lat": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "center_lng": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "radius_meters": {
      +          "type": "number"
      +        },
      +        "stops": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "distance_meters": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "lat": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "lng": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "name": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "name",
      +              "lat",
      +              "lng",
      +              "distance_meters"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "updated_at": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "center_lat",
      +        "center_lng",
      +        "radius_meters",
      +        "stops",
      +        "updated_at"
      +      ],
      +      "type": "object"
      +    },
      +    "ui_blocks": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "data": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "center": {
      +                "items": [
      +                  {
      +                    "anyOf": [
      +                      {
      +                        "type": "number"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ]
      +                  },
      +                  {
      +                    "anyOf": [
      +                      {
      +                        "type": "number"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ]
      +                  }
      +                ],
      +                "type": "array"
      +              },
      +              "stops": {
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "distance_meters": {
      +                      "anyOf": [
      +                        {
      +                          "type": "number"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    },
      +                    "id": {
      +                      "type": "string"
      +                    },
      +                    "lat": {
      +                      "anyOf": [
      +                        {
      +                          "type": "number"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    },
      +                    "lng": {
      +                      "anyOf": [
      +                        {
      +                          "type": "number"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    },
      +                    "name": {
      +                      "anyOf": [
      +                        {
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    }
      +                  },
      +                  "required": [
      +                    "id",
      +                    "name",
      +                    "lat",
      +                    "lng",
      +                    "distance_meters"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "vehicles": {
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "bearing": {
      +                      "anyOf": [
      +                        {
      +                          "type": "number"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    },
      +                    "eta_minutes": {
      +                      "anyOf": [
      +                        {
      +                          "maximum": 9007199254740991,
      +                          "minimum": -9007199254740991,
      +                          "type": "integer"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    },
      +                    "eta_status": {
      +                      "enum": [
      +                        "assigned",
      +                        "unassigned"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "id": {
      +                      "type": "string"
      +                    },
      +                    "lat": {
      +                      "anyOf": [
      +                        {
      +                          "type": "number"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    },
      +                    "lng": {
      +                      "anyOf": [
      +                        {
      +                          "type": "number"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    },
      +                    "next_stop_id": {
      +                      "anyOf": [
      +                        {
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    },
      +                    "route": {
      +                      "anyOf": [
      +                        {
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    }
      +                  },
      +                  "required": [
      +                    "id",
      +                    "route",
      +                    "lat",
      +                    "lng",
      +                    "bearing",
      +                    "next_stop_id",
      +                    "eta_minutes",
      +                    "eta_status"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "zoom": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "center",
      +              "zoom",
      +              "stops",
      +              "vehicles"
      +            ],
      +            "type": "object"
      +          },
      +          "type": {
      +            "const": "map",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "data"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "view": {
      +      "const": "transit_realtime",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "view",
      +    "data",
      +    "ui_blocks"
      +  ],
      +  "type": "object"
      +}
  4. Changed3 schema fields changed
    • changedInput schema / properties / latitude / description
      Previous value: -"Center latitude (WGS84)."New value: +"Decimal latitude of the search centre, WGS84 (e.g. 49.842 for central Lviv)."
    • changedInput schema / properties / longitude / description
      Previous value: -"Center longitude (WGS84)."New value: +"Decimal longitude of the search centre, WGS84 (e.g. 24.031 for central Lviv)."
    • changedInput schema / properties / radius_meters / description
      Previous value: -"Search radius in meters (default 1000; same cap as the public /closest API)."New value: +"Search radius in metres (50–3000, default 1000). Use ~300 for dense urban intersections, up to 3000 for suburban or rural areas."
  5. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, lowering the burden. The description adds useful behavioral context beyond annotations: it specifies the default radius, the adjustable range, and that the result includes walking distance and routes. This clarifies the tool's operational envelope without contradicting the annotations.

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 sentences with no fluff: the first defines the action and output, the second gives routing logic and alternatives, the third gives parameter tuning. Critical information is front-loadedable and every sentence earns its place.

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?

For a read-only geographic lookup tool with a rich output schema and full parameter documentation, the description covers the purpose, return contents, usage conditions, sibling differentiation, and radius parameter guidance. Nothing an agent needs to make an informed call is missing.

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 100%, so the schema already documents all three parameters. The description adds extra value by explaining how to set radius_meters contextually (narrow for dense urban, widen for rural), which goes beyond the schema's bare description. This extra guidance justifies a score above the baseline 3.

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 ('Finds stops near a geographic point') and clearly states the return fields (numeric ID, name, coordinates, walking distance, routes). It also distinguishes itself from search_stops by specifying the search-by-location vs search-by-name distinction, so an agent can select the correct sibling without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

It explicitly states when to use this tool ('first step when the user gives an address or coordinates and you need stop IDs for get_stop_realtime or find_routes_between') and when not to ('Use search_stops instead when the user gives a stop name'). It also gives concrete radius tuning advice for dense urban versus rural areas, leaving no coverage gaps.

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.