get_location_info
Status: Implemented | Module: address
Reverse geocode a lat/lon pair to find what is at a location. Returns the street address plus up to 5 nearby places within a 200m radius. Useful after resolve_address or set_booking_details returns coordinates — call this to discover the facility name at the dropoff, or to verify a destination is a healthcare facility.
Does NOT require a session. Pass session_id for per-org caching.
Annotations
Section titled “Annotations”| Hint | Value |
|---|---|
| readOnlyHint | true |
| openWorldHint | true |
| Field | Type | Required | Description |
|---|---|---|---|
session_id |
string | no | Session ID from verify_member. Optional. |
lat |
float | yes | Latitude (-90 to 90) |
lon |
float | yes | Longitude (-180 to 180) |
Latitude and longitude are validated against WGS84 bounds; out-of-range values return a validation error.
Output
Section titled “Output”| Field | Type | Description |
|---|---|---|
address |
Address | Typed address (street, city, state, zip_code, latitude, longitude) |
is_street |
bool | True when the reverse result resolved to a street-level address |
nearby_places |
Candidate[] | Up to 5 places within 200m |
nearby_count |
int | Size of nearby_places |
Behavior
Section titled “Behavior”- Reverse-geocode and nearby-places lookups run in parallel via
errgroup. - Nearby failure is non-fatal — the tool still returns the reverse-geocoded address.
- Reverse-geocode failure is fatal (the whole call errors).
Caching
Section titled “Caching”- Results cached per
org_id + rounded_coords(4 decimal places, ~11m precision). - Combined reverse + nearby payload is stored in a single cache entry.
- Cache read/write failures are non-fatal.
Side Effects
Section titled “Side Effects”- Touches session TTL when
session_idis provided (non-fatal). - No audit write — lookup only.
Related
Section titled “Related”- Source:
internal/app/address/usecases/get_location_info.go,internal/app/address/adapters/mcp/handlers/get_location_info.go - Companion: find_place, resolve_address
- Next: set_booking_details