KosmoKrator

other

Google Maps Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Google Maps KosmoKrator integration.

7 functions 7 read 0 write API key auth

Lua Namespace

Agents call this integration through app.integrations.google_maps.*. Use lua_read_doc("integrations.google-maps") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Google Maps — Lua API Reference

Use app.integrations.google_maps to geocode addresses, search places, inspect place details, get directions, and calculate distance matrices.

google_maps_geocode_address

Convert an address into geographic coordinates.

local result = app.integrations.google_maps.google_maps_geocode_address({
  address = "1600 Amphitheatre Parkway, Mountain View, CA",
  region = "us",
  language = "en"
})

google_maps_reverse_geocode

Convert latitude and longitude into address results.

local result = app.integrations.google_maps.google_maps_reverse_geocode({
  latitude = 37.422,
  longitude = -122.084
})

google_maps_search_places

Search places with optional location, radius, type, price, and open-now filters.

local result = app.integrations.google_maps.google_maps_search_places({
  query = "coffee near Brussels",
  type = "cafe",
  open_now = true
})

google_maps_get_place_details

Fetch details for a Google Place ID. Use fields to keep responses focused.

local result = app.integrations.google_maps.google_maps_get_place_details({
  place_id = "ChIJN1t_tDeuEmsRUsoyG83frY4",
  fields = { "name", "formatted_address", "geometry", "rating" }
})

google_maps_get_directions

Get directions between two locations.

local result = app.integrations.google_maps.google_maps_get_directions({
  origin = "Brussels Central Station",
  destination = "Atomium, Brussels",
  mode = "transit"
})

google_maps_get_distance_matrix

Calculate distances and durations for origin-destination pairs.

local result = app.integrations.google_maps.google_maps_get_distance_matrix({
  origins = { "Brussels", "Antwerp" },
  destinations = { "Ghent", "Leuven" },
  units = "metric"
})

google_maps_get_current_user

Verify credentials and estimate the current requester location through the Geolocation API.

local result = app.integrations.google_maps.google_maps_get_current_user({})
Raw agent markdown
# Google Maps — Lua API Reference

Use `app.integrations.google_maps` to geocode addresses, search places, inspect place details, get directions, and calculate distance matrices.

## google_maps_geocode_address

Convert an address into geographic coordinates.

```lua
local result = app.integrations.google_maps.google_maps_geocode_address({
  address = "1600 Amphitheatre Parkway, Mountain View, CA",
  region = "us",
  language = "en"
})
```

## google_maps_reverse_geocode

Convert latitude and longitude into address results.

```lua
local result = app.integrations.google_maps.google_maps_reverse_geocode({
  latitude = 37.422,
  longitude = -122.084
})
```

## google_maps_search_places

Search places with optional location, radius, type, price, and open-now filters.

```lua
local result = app.integrations.google_maps.google_maps_search_places({
  query = "coffee near Brussels",
  type = "cafe",
  open_now = true
})
```

## google_maps_get_place_details

Fetch details for a Google Place ID. Use `fields` to keep responses focused.

```lua
local result = app.integrations.google_maps.google_maps_get_place_details({
  place_id = "ChIJN1t_tDeuEmsRUsoyG83frY4",
  fields = { "name", "formatted_address", "geometry", "rating" }
})
```

## google_maps_get_directions

Get directions between two locations.

```lua
local result = app.integrations.google_maps.google_maps_get_directions({
  origin = "Brussels Central Station",
  destination = "Atomium, Brussels",
  mode = "transit"
})
```

## google_maps_get_distance_matrix

Calculate distances and durations for origin-destination pairs.

```lua
local result = app.integrations.google_maps.google_maps_get_distance_matrix({
  origins = { "Brussels", "Antwerp" },
  destinations = { "Ghent", "Leuven" },
  units = "metric"
})
```

## google_maps_get_current_user

Verify credentials and estimate the current requester location through the Geolocation API.

```lua
local result = app.integrations.google_maps.google_maps_get_current_user({})
```

Metadata-Derived Lua Example

local result = app.integrations.google_maps.google_maps_geocode_address({
  address = "example_address",
  components = "example_components",
  region = "example_region",
  language = "example_language"
})
print(result)

Functions

google_maps_geocode_address

Convert a street address into geographic coordinates and place details using Google Maps geocoding.

Operation
Read read
Full name
google-maps.google_maps_geocode_address
ParameterTypeRequiredDescription
address string yes Street address to geocode.
components object no Optional component filters such as {"country": "US"}.
region string no Optional region bias such as "us".
language string no Optional language code such as "en".

google_maps_reverse_geocode

Convert latitude and longitude coordinates into street addresses using Google Maps reverse geocoding.

Operation
Read read
Full name
google-maps.google_maps_reverse_geocode
ParameterTypeRequiredDescription
latitude number yes Latitude coordinate.
longitude number yes Longitude coordinate.
components object no Optional component filters.
language string no Optional language code.
result_type string no Optional result type filter such as "street_address".
location_type string no Optional location type filter such as "ROOFTOP".

google_maps_search_places

Search for places with a text query using Google Maps Places search.

Operation
Read read
Full name
google-maps.google_maps_search_places
ParameterTypeRequiredDescription
query string yes Text search query such as "restaurants in Sydney".
location string no Optional location bias as "lat,lng".
radius number no Optional radius in meters.
language string no Optional language code.
type string no Optional place type such as "restaurant".
open_now boolean no Whether to return only places open now.
min_price integer no Optional minimum price level from 0 to 4.
max_price integer no Optional maximum price level from 0 to 4.

google_maps_get_place_details

Get detailed information about a specific Google Maps place by Place ID.

Operation
Read read
Full name
google-maps.google_maps_get_place_details
ParameterTypeRequiredDescription
place_id string yes Google Place ID.
fields array no Optional list of fields to include.
language string no Optional language code.
region string no Optional region code.
reviews_no_translations string no Set to "true" to disable review translations.
reviews_sort string no Review sort order such as "most_relevant" or "newest".

google_maps_get_directions

Get directions between an origin and destination using Google Maps Directions API.

Operation
Read read
Full name
google-maps.google_maps_get_directions
ParameterTypeRequiredDescription
origin string yes Starting point as address, Place ID, or "lat,lng".
destination string yes Destination as address, Place ID, or "lat,lng".
mode string no Travel mode: driving, walking, bicycling, or transit.
waypoints string no Optional pipe-separated waypoints.
alternatives boolean no Whether to return alternative routes.
avoid array no Avoid options such as tolls, highways, ferries.
language string no Optional language code.
units string no Unit system: metric or imperial.
departure_time string no Departure time as "now" or Unix timestamp.
arrival_time string no Arrival time as Unix timestamp for transit.
transit_mode string no Transit modes such as bus, subway, train, tram, or rail.
transit_routing_preference string no Transit preference: less_walking or fewer_transfers.

google_maps_get_distance_matrix

Calculate travel distances and durations between multiple origins and destinations.

Operation
Read read
Full name
google-maps.google_maps_get_distance_matrix
ParameterTypeRequiredDescription
origins array yes Origin addresses or "lat,lng" strings.
destinations array yes Destination addresses or "lat,lng" strings.
mode string no Travel mode: driving, walking, bicycling, or transit.
language string no Optional language code.
units string no Unit system: metric or imperial.
departure_time string no Departure time as "now" or Unix timestamp.
arrival_time string no Arrival time as Unix timestamp for transit.
avoid array no Avoid options such as tolls, highways, ferries.
transit_mode string no Transit modes as a pipe-separated string.
transit_routing_preference string no Transit preference: less_walking or fewer_transfers.

google_maps_get_current_user

Get geolocation data for the current requester and verify Google Maps API credentials.

Operation
Read read
Full name
google-maps.google_maps_get_current_user
ParameterTypeRequiredDescription
No parameters.