lookup_weather
Retrieves comprehensive environmental intelligence for a location, including Weather, Air Quality (AQI & pollutants), and Pollen (tree, grass, weed, and plant species allergen levels): current conditions, hourly forecasts/history, and daily forecasts for Weather and Air Quality; Pollen is a daily forecast only (today through +4 days, no hourly or past data).
Available Environmental Domains & Capabilities (capabilities: WEATHER, AIR_QUALITY, POLLEN — CRITICAL):
Mandatory Explicit Selection: You MUST include at least one of
WEATHER,AIR_QUALITY, orPOLLENincapabilitieson every call. Omittingcapabilitiesis NOT allowed.Broad / Ambiguous Outdoor Queries (Full Ambient Outdoor Suite): If the user asks a general outdoor, travel, or situational question without restricting to a specific domain (e.g., "What are outdoor conditions like right now for a run?"), explicitly include all three capabilities (
capabilities: ["WEATHER", "AIR_QUALITY", "POLLEN"]) to return the complete ambient outdoor suite (Weather + Air Quality + Pollen); for a pastdate/hour, leave outPOLLEN, which has no history.Targeted Domain Selection (Specific Queries): If the user asks specifically for only one or two domains (e.g., "What is the AQI in Seattle right now?"), include only the requested capabilities (
WEATHER,AIR_QUALITY, and/orPOLLEN). Only the requested domain(s) will be executed and returned. Specific Data Available by Domain:Weather (
weather): Temperature (Current, Feels Like, Max/Min, Heat Index), Wind (Speed, Gusts, Direction), Celestial Events (Sunrise/Sunset, Moon Phase), Precipitation (Type, Probability, Quantity/QPF), and Atmospheric Conditions (UV Index, Humidity, Cloud Cover, Thunderstorm Probability, Air Pressure).Air Quality (
air_quality): Universal & Local Air Quality Indexes (AQI value, category, dominant pollutant), Health Recommendations across 7 sensitivity groups, and Pollutant Concentrations (include_pollutant_concentration: true). Each index has its own dominant pollutant; report it per index (e.g., don't give the Universal AQI's pollutant for the US AQI).Pollen (
pollen): Daily Universal Pollen Index (UPI, 0–5) per Tree, Grass, and Weed category and per plant species (index.valuewith itsindex.category, e.g. 1 = "Very Low"), in-season status, cross-reactions, and health recommendations.Missing Pollen Fields: a missing
in_seasonmeans not in season. Leave out plant species returned without anindex, unless the user asks about that plant; then say no pollen data is reported for it today (don't infer a level). Location Rules (CRITICAL): The target location MUST be specified inlocationusing ONLY ONE of the followingoneofsub-fields:
Geographic Coordinates (
lat_lng):Use when exact latitude/longitude coordinates are known.
Example:
{"location": {"lat_lng": {"latitude": 34.0522, "longitude": -118.2437}}}
Place ID (
place_id):An unambiguous Google Maps Place ID (e.g., obtained from
search_placesorresolve_names).Example:
{"location": {"place_id": "ChIJLU7jZClu5kcR4PcOOO6p3I0"}}
Address String (
address):A city/region, neighborhood, landmark or point of interest, street address, or postal code, ideally with the city/country.
Example:
{"location": {"address": "Paris, France"}}Time & Usage Modes (dateandhour— CRITICAL):
Local Timezone Reference: All
date({year, month, day}) andhour(0-23) inputs MUST be expressed in the requestedlocation's local civil time zone (e.g., a query for"Paris tomorrow at 13:00"usesEurope/Parislocal date and hour13), never UTC or the caller's time zone.1. Current Conditions (
dateomitted ANDhouromitted):Provide
locationand the targetcapabilities(WEATHER,AIR_QUALITY,POLLEN). Do NOT specifydateorhour.Returns real-time Current Conditions (
CC) for the requested domain(s) (current Weather, current-hour Air Quality, and/or today's Pollen forecast).For Air Quality, Current Conditions is a single hour: do NOT use it alone to answer air quality or broad outdoor questions about today as a whole (use Daily Queries below).
2. Hourly Forecast / History (
datespecified ANDhourspecified0-23):Provide
location,date({year, month, day}),hour(0-23), and the targetcapabilities. If minutes are mentioned, round down to the nearest hour.CRITICAL CONSTRAINT (
dateis REQUIRED whenhouris set): Providinghourwithoutdate(dateomitted,hourset) is NOT allowed and will fail with an error. Even when the user asks about a specific hour today (e.g.,"at 13:00 today"), you MUST populate bothdate(today's date atlocation) andhour.Executes an hourly lookup for requested Weather and/or Air Quality at
YYYY-MM-DD-HHand a daily lookup for requested Pollen onYYYY-MM-DD.Weather "when" questions: for weather questions asking when / what time / best time (e.g.,
"what time will it stop raining?"), use hourlyWEATHERcalls (date+hour) for the relevant hours. A daily Weather forecast has no hourly values. For broad outdoor "when / best time" questions (e.g.,"when is the best time to go walking today?"), make these hourlyWEATHERcalls in addition to the full-day call for Air Quality (and Pollen) described under Daily Queries.
3. Daily Queries (
datespecified ANDhouromitted):Provide
location,date({year, month, day}in the requestedlocation's local civil time) withouthour, and the targetcapabilitiesfor full-day queries (e.g.,"weather and pollen in London tomorrow").Air Quality and broad outdoor questions about today: for air quality questions and broad outdoor questions (which include Air Quality) about today (e.g.,
"how will the air quality change today","is today a good day for a picnic?"), setdateto today's date atlocation(hour omitted) to get the day's hourly Air Quality series. A Current Conditions call alone returns only the current hour of Air Quality and is not enough; you may add one if the user also asks about "now".Air Quality time windows: for an air quality question about a window within one day (e.g.,
"air quality between noon and 6 PM"), prefer one Daily call for that date and read the window's hours from the Air Quality series, rather than sampling individual hours. If you use hourly calls, cover every hour of the window.Returns daily forecasts for requested Weather and/or Pollen, and the day's hourly Air Quality series covering the full local day (00:00–23:00 local): 24 historical hours for a past date, 24 forecasted hours for a future date, and for today the earlier hours (history), the current hour, and the remaining hours (forecast). Supported Time Horizons by Domain:
Weather: Hourly from 24 hours ago up to 240 hours (10 days) ahead (past hours need both
dateandhour); daily up to 10 days including today (today through +9 days); no daily history.Air Quality: Hourly from 720 hours (30 days) ago up to 96 hours (4 days) ahead; a full-day call must fit inside that window (in practice today −29 days through +3 days).
Pollen: Daily only, today through +4 days (5 days including today); no past dates, and
houris ignored.(Note: If several capabilities are requested and the
date/houris outside one of their ranges, the call still succeeds and returns only the supported ones.)Out-of-range requests: If a requested date or hour may be outside a domain's supported range above (e.g., Pollen for a past date), still call
lookup_weatherfor the requested date/hour; the error states the supported range. Do not call a different date, hour, or domain as a substitute. Domain Options & Attribution:Language (
language_code): Optional BCP-47 language code (e.g.,"fr"). Defaults to"en".Weather Units (
weather_options.units_systemorunits_system): Defaults toMETRIC. Set toIMPERIAL(Fahrenheit/mph) if the user implies US standards or explicitly requests Imperial units. Supported in bothweather_options.units_system(preferred) and top-levelunits_system; if both are specified, they must not conflict.Air Quality Options (
air_quality_options): Setinclude_pollutant_concentration: truewhen specific pollutant concentrations (PM2.5, PM10, O3, NO2, SO2, CO) are needed; optionally setindex_region_code(2-letter ISO country code, e.g.,"US") to request a specific regional AQI scale. By default, the response includes the Universal AQI and the location's regional AQI.Attribution: Grounded output MUST be attributed to the source using the
attributionfield inside each returned domain container (weather.attribution,air_quality.attribution,pollen.attribution).Returned Times: Air Quality
date_timevalues are already in the location's local time (utc_offsetincluded); present them as-is. Weatherdate_time(current and hourly) and sunrise/sunset times are UTC; convert them to the location's local time usingtime_zone. Label all times as local.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"location": "<location>"
},
"name": "lookup_weather"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Optional. Specifies the date of the requested environmental information, relative to the local timezone of the location specified in the `location` field. Supported date ranges depend on the requested capabilities: - `WEATHER`: up to 24 hours in the past (when `hour` is also set) and up to 10 days (240 hours) in the future (today through +9 days for daily forecasts). - `AIR_QUALITY`: up to 30 days (720 hours) in the past and up to 4 days (96 hours) in the future. - `POLLEN`: today through +4 days (up to 5 days including today; historical dates are not supported). | |
| hour | No | Optional. Specifies the hour of the requested environmental information, in 24-hour format (0-23), relative to the local timezone of the location specified in the `location` field. Requires `date` to be specified. Supported hourly ranges depend on the requested capabilities: - `WEATHER`: up to 24 hours in the past and up to 240 hours (10 days) in the future. - `AIR_QUALITY`: up to 30 days (720 hours) in the past and up to 4 days (96 hours) in the future. - `POLLEN`: returns daily forecasts only; `hour` is ignored for pollen. | |
| location | Yes | Required. The location to get the weather conditions for. | |
| unitsSystem | No | Optional. The units system to use for the returned weather conditions. If not provided, the returned weather conditions will be in the metric system (default = METRIC). | |
| capabilities | No | Optional. The environmental capabilities to include in the response. | |
| languageCode | No | Optional. The BCP-47 language code for localized text in the response (e.g. "en", "ja", "fr-CA"). Defaults to "en" if not specified. | |
| weatherOptions | No | Optional. Options specific to weather requests. `weather_options.units_system` is supported in tandem with top-level `units_system` (tag 4) to preserve backwards compatibility for existing callers; returns INVALID_ARGUMENT if both specify conflicting unit systems. Ignored if `WEATHER` is not requested in `capabilities`. | |
| airQualityOptions | No | Optional. Options specific to air quality requests. Ignored if `AIR_QUALITY` is not requested in `capabilities`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wind | No | The wind conditions | |
| pollen | No | Pollen information at the requested location. | |
| uvIndex | No | The maximum ultraviolet (UV) index. | |
| weather | No | Weather conditions at the requested location. | |
| timeZone | No | Resolved IANA timezone string for the location (e.g., "America/New_York", "Asia/Tokyo"). | |
| heatIndex | No | The hourly heat index temperature. | |
| sunEvents | No | The events related to the sun (e.g. sunrise, sunset). | |
| airQuality | No | Air quality information at the requested location. | |
| cloudCover | No | The percentage of the sky covered by clouds (values from 0 to 100). | |
| moonEvents | No | The events related to the moon (e.g. moonrise, moonset). | |
| airPressure | No | The hourly air pressure conditions. | |
| attribution | No | Required attribution to show with the weather. | |
| temperature | No | The hourly temperature | |
| maxHeatIndex | No | The maximum heat index temperature throughout the day. | |
| precipitation | No | The precipitation probability and amount of precipitation accumulated | |
| maxTemperature | No | The maximum (high) temperature throughout the day. | |
| minTemperature | No | The minimum (low) temperature throughout the day. | |
| relativeHumidity | No | The percent of relative humidity (values from 0 to 100). | |
| returnedLocation | No | Required. The location where the weather information is returned. This location is identical to the location in the request, but can be different from it if the requested location is a free text address that looks up to a coarse location (e.g. "Mountain View, CA"). | |
| weatherCondition | No | The weather condition | |
| feelsLikeTemperature | No | The hourly measure of how the temperature feels like. | |
| feelsLikeMaxTemperature | No | The maximum (high) feels-like temperature throughout the day. | |
| feelsLikeMinTemperature | No | The minimum (low) feels-like temperature throughout the day. | |
| thunderstormProbability | No | The thunderstorm probability (values from 0 to 100). |