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. Changed2 schema fields 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. `marine_forecast_unsupported`: Coordinates fall in a marine area, where NWS publishes no point forecast. 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. `marine_forecast_unsupported`: Coordinates fall in a marine area, where NWS publishes no point forecast. `no_forecast_grid`: Coordinates are on land in a forecast zone NWS serves no forecast grid for (e.g., interior Northern Mariana Islands). Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "out_of_scope",
      -  "marine_forecast_unsupported"
      -]New value: +[
      +  "out_of_scope",
      +  "marine_forecast_unsupported",
      +  "no_forecast_grid"
      +]
  2. Changed2 schema fields 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. `marine_forecast_unsupported`: Coordinates fall in a marine area, where NWS publishes no point forecast. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "out_of_scope"
      -]New value: +[
      +  "out_of_scope",
      +  "marine_forecast_unsupported"
      +]
  3. 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."
  4. 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"
      +]
  5. 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"
      -]
  6. 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"
      +]
  7. 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."
  8. 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"
      +]
  9. 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)."
  10. 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"
      +]
  11. 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"
      +]
  12. Changed1 schema field changed
    • addedOutput schema / properties / periods / items / description
      Added value: +"Single forecast period with time range, conditions, and narrative"
  13. 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"
      +]
  14. First observed

TDQS

B3.2/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read, and an output schema exists, so return values need not be explained. The description adds the useful behavioral detail that results come as named 12-hour periods by default or hourly breakdowns, but says nothing about pagination or data freshness beyond what the cursor parameter already documents.

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

Conciseness4/5

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

Two tight sentences with the core action front-loaded and the output-mode distinction second. No filler, though the space given to return format is partly redundant given the output schema.

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

Completeness3/5

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

With readOnlyHint, a full output schema, and 100% parameter coverage, the definition is close to complete for a forecast fetch. The notable gap is the absence of any routing between this point forecast and the sibling nws_get_zone_forecast, which an agent must otherwise infer.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents latitude, longitude, hourly, and cursor, including ranges, defaults, and the continuation token's behavior. The description restates the hourly-vs-12-hour mode but adds no syntax or meaning beyond the schema, making the baseline 3 appropriate.

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?

States a specific verb and resource ('Get the weather forecast') plus scope ('for a US location'), and clarifies the two output modes. It does not distinguish itself from the close sibling nws_get_zone_forecast, leaving the point-forecast-vs-zone-forecast choice unexplained.

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?

The description gives no when-to-use or when-not guidance and never names the obvious alternative, nws_get_zone_forecast, or when lat/lon point forecasts are preferable. Only implicit cues ('US location', the default/hourly switch) hint at appropriate use.

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.