Find best weather window
find_best_windowFind the optimal time window for an activity based on weather criteria. Scans the forecast and returns daylight-aware periods matching all conditions. Criteria are expressed in the selected units system (default imperial: °F, mph, miles, feet). Example: {"location": "Boulder, CO", "criteria": {"min_temperature": 55, "max_wind_speed": 15, "max_precipitation_probability": 20}, "hours": 72, "activity_duration_hours": 3}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | No | Latitude in decimal degrees (-90 to 90). Most tools also accept a `location` place-name string instead of lat/lon. | |
| lon | No | Longitude in decimal degrees (-180 to 180). For continental US use negative values (west of the prime meridian). | |
| hours | No | Hours to search. Default 72. | |
| units | No | Unit system for all values in the request and response: imperial (°F, mph, inches), metric (°C, km/h, mm), or si (K, m/s, mm). Defaults to imperial. | imperial |
| criteria | Yes | Weather criteria defining acceptable conditions (all optional). | |
| location | No | Free-text place: city ("Denver"), city+state ("Portland, OR"), US ZIP ("50219"), or "lat,lon" ("39.74,-104.99"). Provide either this OR explicit lat+lon, not both. | |
| daylight_only | No | Only consider daylight hours (sunrise to sunset). Default true. | |
| activity_duration_hours | No | Minimum consecutive hours meeting criteria. Default 2. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | Yes | ||
| message | No | ||
| windows | Yes | ||
| location | Yes | ||
| sun_times | No | ||
| daylight_only | Yes | ||
| criteria_applied | Yes | ||
| activity_duration_hours | Yes |