Skip to main content
Glama

Nws Get Forecast

nws_get_forecast
Read-only

Get the weather forecast for a US location. Returns either named 12-hour periods (default) or hourly breakdowns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoOpaque continuation token from a previous response's nextCursor, to retrieve the next 48 periods. Omit for the first page. 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.
hourlyNoIf 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.
latitudeYesLatitude in decimal degrees (e.g., 47.6062).
longitudeYesLongitude in decimal degrees (e.g., -122.3321).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoForecast mode: "hourly" or "7-day"
errorNoPresent when the call failed. Absent on success.
shownNoNumber of forecast periods in this page (at most 48).
noticeNoSet when periods remain beyond this page, or when the supplied cursor points past the end of the period array.
periodsNoForecast periods
locationNoResolved location metadata
nextCursorNoOpaque token for the next page of periods — pass it back as `cursor`. Omitted when this is the last page.
totalCountNoTotal 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.
generatedAtNoWhen the forecast was generated (ISO 8601)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `out_of_scope`: Coordinates fall outside US National Weather Service coverage Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `out_of_scope`: Coordinates fall outside US National Weather Service coverage. Other values are possible when a failure originates below the handler."
  2. Changed6 schema fields changed
    • removedOutput schema / properties / periods / items / properties / dewpointC / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / periods / items / properties / dewpointC / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / periods / items / properties / precipChancePct / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / periods / items / properties / precipChancePct / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / periods / items / properties / relativeHumidityPct / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / periods / items / properties / relativeHumidityPct / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "location",
      +      "generatedAt",
      +      "periods",
      +      "totalCount",
      +      "shown",
      +      "mode"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `out_of_scope`: Coordinates fall outside US National Weather Service coverage Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "out_of_scope"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "location",
      -  "generatedAt",
      -  "periods",
      -  "totalCount",
      -  "shown",
      -  "mode"
      -]
  4. Changed5 schema fields changed
    • removedOutput schema / properties / periodCount
      Removed value: -{
      -  "description": "Number of forecast periods in this page (at most 48).",
      -  "type": "number"
      -}
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Number of forecast periods in this page (at most 48).",
      +  "type": "number"
      +}
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "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.",
      +  "type": "number"
      +}
    • removedOutput schema / properties / totalPeriodCount
      Removed value: -{
      -  "description": "Total forecast periods available upstream before the page window was applied.",
      -  "type": "number"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "location",
      -  "generatedAt",
      -  "periods",
      -  "periodCount",
      -  "totalPeriodCount",
      -  "mode"
      -]New value: +[
      +  "location",
      +  "generatedAt",
      +  "periods",
      +  "totalCount",
      +  "shown",
      +  "mode"
      +]
  5. Changed6 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Opaque continuation token from a previous response's nextCursor, to retrieve the next 48 periods. Omit for the first page. 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.",
      +  "type": "string"
      +}
    • changedInput schema / properties / hourly / description
      Previous value: -"If true, returns hourly forecast (next 48 one-hour periods) instead of 12-hour named periods (14 periods). Hourly includes dewpoint and relative humidity."New value: +"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."
    • addedOutput schema / properties / nextCursor
      Added value: +{
      +  "description": "Opaque token for the next page of periods — pass it back as `cursor`. Omitted when this is the last page.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Set when upstream returned more periods than the cap — states how many periods were omitted."New value: +"Set when periods remain beyond this page, or when the supplied cursor points past the end of the period array."
    • changedOutput schema / properties / periodCount / description
      Previous value: -"Number of forecast periods returned (capped at 48)."New value: +"Number of forecast periods in this page (at most 48)."
    • changedOutput schema / properties / totalPeriodCount / description
      Previous value: -"Total forecast periods available upstream before the cap was applied."New value: +"Total forecast periods available upstream before the page window was applied."
  6. Changed5 schema fields changed
    • changedInput schema / properties / hourly / description
      Previous value: -"If true, returns hourly forecast (~156 periods) instead of 12-hour named periods (14 periods). Hourly includes dewpoint and relative humidity."New value: +"If true, returns hourly forecast (next 48 one-hour periods) instead of 12-hour named periods (14 periods). Hourly includes dewpoint and relative humidity."
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Set when upstream returned more periods than the cap — states how many periods were omitted.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / periodCount / description
      Previous value: -"Number of forecast periods returned"New value: +"Number of forecast periods returned (capped at 48)."
    • addedOutput schema / properties / totalPeriodCount
      Added value: +{
      +  "description": "Total forecast periods available upstream before the cap was applied.",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "location",
      -  "generatedAt",
      -  "periods",
      -  "periodCount",
      -  "mode"
      -]New value: +[
      +  "location",
      +  "generatedAt",
      +  "periods",
      +  "periodCount",
      +  "totalPeriodCount",
      +  "mode"
      +]
  7. Changed2 schema fields changed
    • changedInput schema / properties / latitude / description
      Previous value: -"Latitude in decimal degrees (e.g., 47.6062). Truncated to 4 decimal places."New value: +"Latitude in decimal degrees (e.g., 47.6062)."
    • changedInput schema / properties / longitude / description
      Previous value: -"Longitude in decimal degrees (e.g., -122.3321). Truncated to 4 decimal places."New value: +"Longitude in decimal degrees (e.g., -122.3321)."
  8. Changed3 schema fields changed
    • addedOutput schema / properties / mode
      Added value: +{
      +  "description": "Forecast mode: \"hourly\" or \"7-day\"",
      +  "type": "string"
      +}
    • addedOutput schema / properties / periodCount
      Added value: +{
      +  "description": "Number of forecast periods returned",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "location",
      -  "generatedAt",
      -  "periods"
      -]New value: +[
      +  "location",
      +  "generatedAt",
      +  "periods",
      +  "periodCount",
      +  "mode"
      +]
  9. Changed7 schema fields changed
    • removedOutput schema / properties / periods / items / properties / dewpoint
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Dewpoint in Celsius (hourly only)"
      -}
    • addedOutput schema / properties / periods / items / properties / dewpointC
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Dewpoint in Celsius (hourly only)"
      +}
    • removedOutput schema / properties / periods / items / properties / precipChance
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Probability of precipitation (%)"
      -}
    • addedOutput schema / properties / periods / items / properties / precipChancePct
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Probability of precipitation in percent (0-100)"
      +}
    • removedOutput schema / properties / periods / items / properties / relativeHumidity
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Relative humidity % (hourly only)"
      -}
    • addedOutput schema / properties / periods / items / properties / relativeHumidityPct
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Relative humidity in percent (0-100, hourly only)"
      +}
    • changedOutput schema / properties / periods / items / required
      Previous value: -[
      -  "name",
      -  "startTime",
      -  "endTime",
      -  "temperature",
      -  "temperatureUnit",
      -  "windSpeed",
      -  "windDirection",
      -  "shortForecast",
      -  "detailedForecast",
      -  "precipChance",
      -  "dewpoint",
      -  "relativeHumidity"
      -]New value: +[
      +  "name",
      +  "startTime",
      +  "endTime",
      +  "temperature",
      +  "temperatureUnit",
      +  "windSpeed",
      +  "windDirection",
      +  "shortForecast",
      +  "detailedForecast",
      +  "precipChancePct",
      +  "dewpointC",
      +  "relativeHumidityPct"
      +]
  10. Changed1 schema field changed
    • addedOutput schema / properties / periods / items / description
      Added value: +"Single forecast period with time range, conditions, and narrative"
  11. Changed3 schema fields changed
    • addedOutput schema / properties / location / properties / county
      Added value: +{
      +  "description": "County zone code for chaining to nws_search_alerts",
      +  "type": "string"
      +}
    • addedOutput schema / properties / location / properties / forecastZone
      Added value: +{
      +  "description": "Forecast zone code for chaining to nws_search_alerts",
      +  "type": "string"
      +}
    • changedOutput schema / properties / location / required
      Previous value: -[
      -  "city",
      -  "state",
      -  "office",
      -  "timeZone"
      -]New value: +[
      +  "city",
      +  "state",
      +  "office",
      +  "timeZone",
      +  "forecastZone",
      +  "county"
      +]
  12. First observed

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint annotation already covers safety, and the description adds a useful behavioral detail: forecasts come as named 12-hour periods by default or hourly breakdowns. However, it does not disclose pagination, forecast regeneration, or error behavior beyond what the schema's cursor description already provides.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with no filler, front-loading the core action and then stating the output options. Every word contributes useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema, readOnlyHint annotation, and fully documented parameters, the description does not need to enumerate return fields or cursor mechanics. It is sufficient for a read-only forecast tool, though an explicit pointer to sibling tools for alternative forecast types would make it slightly more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the parameter descriptions are already detailed, so the baseline is 3. The phrase 'US location' adds meaningful geographic context for latitude/longitude that the schema's world-wide bounds do not convey, giving the description extra semantic value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Get the weather forecast') and resource ('a US location'), and briefly characterizes the output formats. It is clear at a glance, but it does not explicitly distinguish itself from sibling tools like nws_get_zone_forecast, so it falls short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance about when to use this tool versus alternatives such as nws_get_zone_forecast or nws_get_observations. The description explains what the tool returns but not the conditions under which an agent should pick it over other forecast-related tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.