Location Skill
Provides geocoding capabilities to convert city names to coordinates.
Tools
get_location
Get geographic coordinates for a city.
Parameters:
city(str, optional): City name to geocode. Defaults to "Hangzhou".
Returns: Dictionary containing:
city: City namelat: Latitudelon: Longitudecountry: Country namecountry_code: ISO country codetimezone: Timezone identifierpopulation: City population (if available)
Examples:
get_location("Beijing")
# Returns: {"city": "Beijing", "lat": 39.9042, "lon": 116.4074, "country": "China", ...}
get_location("Tokyo")
# Returns: {"city": "Tokyo", "lat": 35.6895, "lon": 139.6917, "country": "Japan", ...}
get_location() # defaults to Hangzhou
# Returns: {"city": "Hangzhou", "lat": 30.2741, "lon": 120.1551, "country": "China", ...}
Data Source
Uses Open-Meteo Geocoding API - free, no API key required.
Usage with Weather Skill
Combine with weather skill to get weather for any city:
location = get_location("Shanghai")
weather = get_weather(location["lat"], location["lon"], "today")
Converted and distributed by TomeVault — claim your Tome and manage your conversions.