GetLocationAddressTool

Reverse-geocodes a latitude/longitude pair to a postal address via the platform android.location.Geocoder (needs network access; no location permission). On API 33+ uses the async callback API with a 5 s timeout; below that the deprecated blocking call. Output: latitude, longitude, formatted_address, street, city, district, state, country, country_code, postal_code. Returns ToolResult.error for out-of-range coordinates, when no Geocoder backend is present, on timeout, or when no address matches.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override val annotations: ToolAnnotations
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val parameters: List<ToolParameter>

Functions

Link copied to clipboard
open suspend override fun execute(params: Map<String, Any>): ToolResult