Nws Get Forecast
nws_get_forecastGet the weather forecast for a US location. Returns either named 12-hour periods (default) or hourly breakdowns.
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": {
"latitude": "<latitude>",
"longitude": "<longitude>"
},
"name": "nws_get_forecast"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Opaque continuation token from a previous response's nextCursor, to retrieve the next 48 periods. Omit for the first page. The token carries the mode it was issued in (hourly or 7-day), so the next page stays in that mode whatever hourly is set to. Every call re-fetches the forecast, so consecutive periods are contiguous within one response; NWS reissues forecasts through the day, so a later call can window a regenerated period array. | |
| hourly | No | If true, returns hourly forecast (48 one-hour periods per page, ~156 available) instead of 12-hour named periods (14 periods). Hourly includes dewpoint and relative humidity. Sets the mode of the first page; a cursor carries its own mode, so this is ignored when cursor is set. | |
| latitude | Yes | Latitude in decimal degrees (e.g., 47.6062). | |
| longitude | Yes | Longitude in decimal degrees (e.g., -122.3321). | |
| include_amounts | No | Include every native quantitativePrecipitation, snowfallAmount, and iceAccumulation interval from the NWS grid. Applies to this call only, including cursor pages; units and interval strings remain as NWS sends them. Unavailable amounts are explained in notice while the forecast remains available. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Forecast mode: "hourly" or "7-day" | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of forecast periods in this page (at most 48). | |
| notice | No | Guidance when forecast data was last updated more than 24 hours ago, periods remain or the cursor points past the end, or requested amount data or layers are unavailable. | |
| periods | No | Forecast periods | |
| location | No | Resolved location metadata | |
| nextCursor | No | Opaque token for the next page of periods — pass it back as `cursor`; it carries this forecast mode (hourly or 7-day). Omitted when this is the last page. | |
| totalCount | No | Total forecast periods available upstream before the page window was applied — NOT the number in this page, which is shown. Compare it against shown to tell whether periods were withheld. | |
| updateTime | No | When the data this forecast was generated from was last updated (ISO 8601, as NWS sends it). A grid that stops updating keeps this time while generatedAt keeps advancing. Null when NWS omits it. | |
| generatedAt | No | When NWS generated this response (ISO 8601). It advances whenever NWS regenerates the response, even when the underlying data is unchanged; see updateTime for the data age. | |
| amountsUpdateTime | No | Native grid updateTime, distinct from forecast updateTime; null when omitted upstream and absent when amounts were not fetched | |
| precipitationAmounts | No | Present grid amount layers when requested and fetched successfully; missing layers are named in notice |