GetCurrentLocationTool

Returns the device's last known cached location from android.location.LocationManager (no fresh fix is requested). Requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION. Accepts an accuracy param ("fine" | "coarse", default "coarse") that only reorders the provider preference (GPS/network/fused). Output: latitude, longitude, accuracy_meters, altitude, speed_mps, timestamp, provider. Returns ToolResult.error when permission is missing, the accuracy value is invalid, or no cached fix exists on any enabled provider.

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