get_weather_forecast
Retrieve detailed weather forecasts including current conditions, hourly, and daily data for any location. Specify latitude, longitude, and optional parameters to customize units, timezone, and forecast days.
Instructions
Get comprehensive weather forecast with current conditions, hourly, and daily forecasts.
This tool provides detailed weather forecasts from Open-Meteo API with 50+ weather variables. Use this for answering questions about current weather, future forecasts, or detailed conditions.
Args: latitude: Latitude coordinate in decimal degrees (-90 to 90). Use geocode_location to find coordinates. longitude: Longitude coordinate in decimal degrees (-180 to 180). Use geocode_location to find coordinates. temperature_unit: Temperature unit. Options: "celsius" (default), "fahrenheit" wind_speed_unit: Wind speed unit. Options: "kmh" (default), "ms", "mph", "kn" precipitation_unit: Precipitation unit. Options: "mm" (default), "inch" timezone: Timezone name (e.g., "America/New_York", "Europe/London") or "auto" for automatic detection forecast_days: Number of forecast days (1-16). Default is 7. current_weather: Set to True to include current weather conditions (recommended) hourly: Comma-separated list of hourly variables. Popular options: - temperature_2m: Temperature at 2m height - precipitation: Total precipitation (rain + snow) - rain: Rain only - snowfall: Snowfall amount - cloud_cover: Cloud cover percentage (0-100) - wind_speed_10m, wind_direction_10m: Wind at 10m height - relative_humidity_2m: Relative humidity - pressure_msl: Sea level pressure - visibility: Visibility distance - uv_index: UV index daily: Comma-separated list of daily variables. Popular options: - temperature_2m_max, temperature_2m_min: Daily temperature range - precipitation_sum: Total daily precipitation - rain_sum: Total daily rain - sunrise, sunset: Sun times - wind_speed_10m_max: Maximum daily wind speed - precipitation_hours: Hours with precipitation
Returns: WeatherForecast: A Pydantic model containing: - latitude, longitude: Actual coordinates used - current_weather: Current conditions (temperature, wind, weather code) - hourly: Hourly forecast data (if requested) - daily: Daily forecast data (if requested) - timezone: Timezone information
Tips for LLMs: - Always use current_weather=True for "what's the weather" questions - Request hourly data for detailed forecasts (e.g., "hourly rain predictions") - Request daily data for multi-day forecasts (e.g., "week ahead") - Weather codes: 0=clear, 1-3=partly cloudy, 45/48=fog, 51-57=drizzle, 61-67=rain, 71-77=snow, 80-82=rain showers, 95-99=thunderstorm
Example: # Get current weather for London forecast = await get_weather_forecast(51.5072, -0.1276, current_weather=True) temp = forecast.current_weather.temperature
# Get detailed 3-day forecast with hourly data
forecast = await get_weather_forecast(
51.5072, -0.1276,
forecast_days=3,
hourly="temperature_2m,precipitation,wind_speed_10m",
daily="temperature_2m_max,temperature_2m_min,precipitation_sum"
)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| daily | No | ||
| hourly | No | ||
| latitude | Yes | ||
| timezone | No | auto | |
| longitude | Yes | ||
| forecast_days | No | ||
| current_weather | No | ||
| wind_speed_unit | No | kmh | |
| temperature_unit | No | celsius | |
| precipitation_unit | No | mm |