atmon docs

REFERENCE/TOOLKITS/GOOGLE_MAPS.MD

Google Maps Platform

Maps and places. Turn an address into coordinates, get directions and travel times, and look up businesses, elevation, and time zones.

PropertyValue
Sluggoogle_maps
Definition version0.1.0
Base URLhttps://maps.googleapis.com/maps/api
Auth schemesapi_key
Action tools13
By class13 read
Triggers0
Provider rate limitnot declared, so outbound calls are unpaced

Measured routing accuracy

26 golden cases replayed through the router over the whole index: measured over corpus ea4f12ad2948 (65 toolkits, 2283 tools indexed and 13 declared uncallable), 13 cases written by hand and 13 cases from the paraphrase pass. A case counts as top-1 when its gold tool ranked first and top-8 when it reached the slate at all.

MeasureCasesShare
top-117/2665.4%
top-821/2680.8%

The sweep is offline: the reranker is a deterministic identity fake that returns candidates in the order retrieval produced them, so top-1 measures retrieval order rather than a reranked slate. just eval-live measures the same cases through the live reranker.

Authentication

Connect an entity with ConnectionsService.InitiateConnection, naming this toolkit's slug. Credentials stay in the connections vault; callers hold connected-account ids only.

api_key

PropertyValue
Placementquery
Namekey
Rendered as{key}

Submit the key with ConnectionsService rather than putting it in a request; it is sealed at rest and never returned.

Tools

13 action tools. The catalog-wide slug is google_maps.<tool>, which is what search_tools returns and call_tool takes.

google_maps.geocode_address

Look up the latitude/longitude, formatted address, and place id for a street address or place name using Google Maps geocoding. Use when the user gives an address or place name in words and wants coordinates or a place id back. For the reverse direction, turning coordinates into an address, use reverse_geocode instead.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /geocode/json.

Arguments:

ArgumentTypeRequiredNotes
addressstringyesStreet address or place name to geocode, e.g. "1600 Amphitheatre Parkway, Mountain View, CA".
languagestringnoLanguage for the returned formatted address, e.g. "es".
regionstringnoccTLD bias for ambiguous results, e.g. "uk" to prefer United Kingdom matches.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
resultsarray of object
results[].formatted_addressstring
results[].geometryobject
results[].geometry.locationobject
results[].geometry.location_typestring
results[].place_idstring
results[].typesarray of string
statusstring

Also retrieved by: "turn this street address into coordinates", "what's the lat and long for our new office", "pin this place name down to a spot on the map", "I have an address, I need the geocode for it".

google_maps.reverse_geocode

Look up the street address (or the nearest addresses and place types) at a given latitude/longitude using Google Maps reverse geocoding. Use when the user has coordinates, from a GPS fix or a map click, and wants to know what's there or get a mailing address. For turning an address into coordinates, use geocode_address instead.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /geocode/json.

Arguments:

ArgumentTypeRequiredNotes
languagestringnoLanguage for the returned formatted address, e.g. "es".
latlngstringyesComma-separated "latitude,longitude" to reverse-geocode, e.g. "40.714224,-73.961452".
result_typestringnoComma-separated place types to restrict results to, e.g. "street_address" or "postal_code".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
resultsarray of object
results[].formatted_addressstring
results[].place_idstring
results[].typesarray of string
statusstring

Also retrieved by: "what's actually at these coordinates", "figure out the street address from this gps fix", "somebody dropped a pin, tell me what's there", "translate this lat/long back into a mailing address".

google_maps.get_directions

Get turn-by-turn Google Maps driving, walking, bicycling, or transit directions between an origin and a destination, with distance and duration per leg and per step. Use when the user wants a route or needs to know how to get from one place to another. For travel time or distance across many origins and destinations at once rather than one route, use get_distance_matrix.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /directions/json.

Arguments:

ArgumentTypeRequiredNotes
alternativesbooleannoReturn multiple alternative routes instead of just the best one.
avoidstringnoComma-separated features to route around: "tolls", "highways", "ferries", "indoor".
departure_timestringnoUnix timestamp, or "now", for transit/driving-time-in-traffic routes.
destinationstringyesEnding point as an address, "lat,lng", or "place_id:ID".
modestring, one of driving, walking, bicycling, transitnoTravel mode. Default driving.
originstringyesStarting point as an address, "lat,lng", or "place_id:ID".
waypointsstringnoPipe-separated intermediate stops, each an address, "lat,lng", or "place_id:ID".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
routesarray of object
routes[].legsarray of object
routes[].legs[].distanceobject
routes[].legs[].durationobject
routes[].legs[].end_addressstring
routes[].legs[].start_addressstring
routes[].legs[].stepsarray of object
routes[].summarystring
routes[].warningsarray of string
statusstring

Also retrieved by: "how do I drive from the airport to the hotel", "map out a walking route between these two spots", "I need turn by turn directions for this trip", "what's the fastest way to get across town from here".

google_maps.get_distance_matrix

Get travel distance and duration for every combination of several origins and destinations at once via the Google Maps Distance Matrix API. Use when the user wants to compare travel time or distance across multiple places, e.g. "which of these three offices is closest to each candidate's address", rather than one turn-by-turn route. For a single route's step-by-step directions, use get_directions.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /distancematrix/json.

Arguments:

ArgumentTypeRequiredNotes
departure_timestringnoUnix timestamp, or "now", to factor in current traffic for driving.
destinationsstringyesPipe-separated ending points, each an address or "lat,lng".
modestring, one of driving, walking, bicycling, transitnoTravel mode. Default driving.
originsstringyesPipe-separated starting points, each an address or "lat,lng".
unitsstring, one of metric, imperialnoUnit system for the returned distance text.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
destination_addressesarray of string
origin_addressesarray of string
rowsarray of object
rows[].elementsarray of object
rows[].elements[].distanceobject
rows[].elements[].durationobject
rows[].elements[].statusstring
statusstring

Also retrieved by: "which warehouse is closest to each of these delivery addresses", "compare drive times from our three offices to the client", "build a grid of travel time between every pair of these locations", "rank these candidate addresses by how far they are from headquarters".

google_maps.get_elevation

Get the ground elevation in meters at one or more specific latitude/longitude points via the Google Maps Elevation API. Use when the user names exact points and asks how high up a location is. For elevation sampled evenly along a route rather than named points, use get_elevation_along_path instead.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /elevation/json.

Arguments:

ArgumentTypeRequiredNotes
locationsstringyesPipe-separated "lat,lng" points to sample, e.g. "39.7391536,-104.9847034|36.455556,-116.866667".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
resultsarray of object
results[].elevationnumber
results[].locationobject
results[].location.latnumber
results[].location.lngnumber
results[].resolutionnumber
statusstring

Also retrieved by: "how high above sea level is this spot", "check the altitude at these coordinates", "I want the ground height at a couple of points".

google_maps.get_elevation_along_path

Get a Google Maps elevation profile: ground elevation in meters at a set number of evenly spaced points sampled along a path of latitude/longitude waypoints. Use when the user wants elevation change over the length of a route or hike rather than at a few named points; for exact named points, use get_elevation instead.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /elevation/json.

Arguments:

ArgumentTypeRequiredNotes
pathstringyesPipe-separated "lat,lng" waypoints defining the path to sample along.
samplesintegeryesNumber of equally spaced points to sample along the path, minimum 2.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
resultsarray of object
results[].elevationnumber
results[].locationobject
results[].location.latnumber
results[].location.lngnumber
results[].resolutionnumber
statusstring

Also retrieved by: "chart the elevation gain over this hiking route", "sample the terrain height along this trail", "I need an elevation profile for the whole path, not just the ends".

google_maps.get_timezone

Get the time zone id, name, and UTC offset (including any daylight saving adjustment) for a location at a given moment via the Google Maps Time Zone API. Use when the user asks what time zone a place is in or what the local time offset is there. The moment matters because the offset changes with daylight saving.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /timezone/json.

Arguments:

ArgumentTypeRequiredNotes
languagestringnoLanguage for the returned time zone name, e.g. "es".
locationstringyesComma-separated "latitude,longitude" to look up, e.g. "40.714224,-73.961452".
timestampintegeryesUnix timestamp (seconds) of the moment to compute the offset at, since it varies by date under daylight saving.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dstOffsetinteger
rawOffsetinteger
statusstring
timeZoneIdstring
timeZoneNamestring

Also retrieved by: "what timezone does this coordinate fall in", "is daylight saving in effect out there right now", "tell me the utc offset for this spot on a given date".

google_maps.search_places_by_text

Search Google Maps places by a free-text query like a business name, category, or address, e.g. "pizza in Chicago" or "24-hour pharmacies near me". Use when the user describes what they're looking for in words. For places near a known point without a text description, use search_nearby_places; for matching one specific known name to a single result, use find_place.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /place/textsearch/json.

Arguments:

ArgumentTypeRequiredNotes
locationstringnoOptional "lat,lng" bias point to search around.
opennowbooleannoOnly return places open at the time of the call.
querystringyesFree-text search, e.g. "vegan restaurants in Austin, TX".
radiusintegernoBias radius in meters around location, max 50000.
typestringnoRestrict to one place type, e.g. "restaurant" or "pharmacy".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
next_page_tokenstring
resultsarray of object
results[].business_statusstring
results[].formatted_addressstring
results[].geometryobject
results[].geometry.locationobject
results[].namestring
results[].place_idstring
results[].ratingnumber
results[].typesarray of string
results[].user_ratings_totalinteger
statusstring

Also retrieved by: "find late night ramen spots downtown", "look up ATMs near the convention center by description", "I'm hunting for a bookstore that matches this vibe", "search for vegan brunch places in this neighborhood".

google_maps.search_nearby_places

Find Google Maps places of a given type or keyword near a specific latitude/longitude, e.g. coffee shops within 500 meters of a point. Use when the user wants results ranked by proximity to a location rather than by a free-text description. For a text query without a fixed center point, use search_places_by_text instead.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /place/nearbysearch/json.

Arguments:

ArgumentTypeRequiredNotes
keywordstringnoFree-text term to match against place name, type, or reviews.
locationstringyesCenter point as "lat,lng" to search around.
opennowbooleannoOnly return places open at the time of the call.
radiusintegernoSearch radius in meters, max 50000. Omit when rankby is "distance".
rankbystring, one of prominence, distancenoHow to order results. "distance" requires keyword or type and ignores radius.
typestringnoRestrict to one place type, e.g. "cafe" or "gas_station".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
next_page_tokenstring
resultsarray of object
results[].business_statusstring
results[].geometryobject
results[].geometry.locationobject
results[].namestring
results[].place_idstring
results[].ratingnumber
results[].typesarray of string
results[].user_ratings_totalinteger
results[].vicinitystring
statusstring

Also retrieved by: "what's within walking distance of this pin", "show me gas stations close to this exact point", "list the coffee shops inside a five minute radius here".

google_maps.find_place

Match a specific known business name, address, or place description to a single best Google Maps place, returning its place id and a short summary. Use when the user already knows what they're looking for by name and wants the one right match rather than a list of candidates to pick from. For browsing multiple results for a looser query, use search_places_by_text instead.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /place/findplacefromtext/json.

Arguments:

ArgumentTypeRequiredNotes
fieldsstringnoComma-separated fields to return, e.g. "place_id,name,formatted_address,geometry".
inputstringyesThe name, address, or description of the place to match, e.g. "Museum of Modern Art New York".
locationbiasstringnoBias toward an area, e.g. "circle:2000@47.6918452,-122.2226413".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
candidatesarray of object
candidates[].formatted_addressstring
candidates[].geometryobject
candidates[].geometry.locationobject
candidates[].namestring
candidates[].place_idstring
statusstring

Also retrieved by: "track down the exact listing for this one restaurant by name", "I know exactly which business I mean, get me its record", "match this business name to its one real place entry".

google_maps.get_place_details

Get full Google Maps details for one place by its place id: phone number, website, opening hours, rating, and recent reviews. Use after find_place, search_places_by_text, or search_nearby_places once the user wants more than the short summary those return, e.g. "is it open right now" or "what's their phone number".

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /place/details/json.

Arguments:

ArgumentTypeRequiredNotes
fieldsstringnoComma-separated fields to return, e.g. "name,formatted_phone_number,opening_hours". Omit for the full default set.
languagestringnoLanguage for the returned text fields, e.g. "es".
place_idstringyesPlace id to look up, from find_place, search_places_by_text, or search_nearby_places.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
resultobject
result.business_statusstring
result.formatted_addressstring
result.formatted_phone_numberstring
result.geometryobject
result.geometry.locationobject
result.international_phone_numberstring
result.namestring
result.opening_hoursobject
result.opening_hours.open_nowboolean
result.opening_hours.weekday_textarray of string
result.place_idstring
result.ratingnumber
result.reviewsarray of object
result.reviews[].author_namestring
result.reviews[].ratinginteger
result.reviews[].relative_time_descriptionstring
result.reviews[].textstring
result.urlstring
result.user_ratings_totalinteger
result.websitestring
statusstring

Also retrieved by: "is this place open right now", "grab their phone number and hours off the listing", "pull up recent reviews for this spot", "what's the website on file for that business".

google_maps.autocomplete_place

Get Google Maps place predictions as a user types a partial address or business name, for building a search-as-you-type autocomplete field. Use when the input is an incomplete, in-progress query rather than a finished search someone already typed out fully. For predicting the rest of a general search phrase instead of an actual place, use autocomplete_query.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /place/autocomplete/json.

Arguments:

ArgumentTypeRequiredNotes
componentsstringnoRestrict to a country, e.g. "country:us".
inputstringyesThe partial text typed so far, e.g. "123 Main St, Sp".
locationstringnoOptional "lat,lng" bias point for predictions.
radiusintegernoBias radius in meters around location.
typesstringnoRestrict predictions to a category, e.g. "address", "establishment", or "geocode".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
predictionsarray of object
predictions[].descriptionstring
predictions[].place_idstring
predictions[].structured_formattingobject
predictions[].structured_formatting.main_textstring
predictions[].structured_formatting.secondary_textstring
statusstring

Also retrieved by: "suggest addresses as someone types into this field", "build a type-ahead box for picking a location", "offer place suggestions while the input is still partial".

google_maps.autocomplete_query

Predict likely search queries, not specific places, for a partial Google Maps text search, e.g. finishing "pizza near" as the user types. Use when the input is a general search phrase still being typed rather than a specific address or business name; for predicting an actual place to select, use autocomplete_place instead.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /place/queryautocomplete/json.

Arguments:

ArgumentTypeRequiredNotes
inputstringyesThe partial search phrase typed so far, e.g. "pizza near".
locationstringnoOptional "lat,lng" bias point for predictions.
radiusintegernoBias radius in meters around location.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
predictionsarray of object
predictions[].descriptionstring
predictions[].place_idstring
predictions[].structured_formattingobject
predictions[].structured_formatting.main_textstring
predictions[].structured_formatting.secondary_textstring
statusstring

Also retrieved by: "guess what search phrase they're going for as they type", "suggest how to finish this half typed search term", "predict the rest of a vague search string, not a place".