Skip to main content
Glama

Forecast By Zip

forecast_by_zip
Read-onlyIdempotent

EPA AirNow air quality (AQI) forecast for a US ZIP code, today and up to three days ahead, per pollutant, with the forecast category, Action Day flag and the forecaster's discussion text. Pass a date (YYYY-MM-DD) to get one day, omit it for every day AirNow has issued. Answers "is tomorrow ok for outdoor activity in 60601".

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "zip_code": "10001"
    },
    "name": "forecast_by_zip"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoYYYY-MM-DD forecast day (default: every day AirNow has issued, today + up to 3)
locationNoFree-text place instead of a ZIP code: a city ("Carnelian Bay, CA"), landmark, address, county or "10 miles north of Truckee". Resolved to a center point; the answer echoes resolved_location {name, match_type, center, bbox} so you can refuse a match coarser than you need. An ambiguous name ("Springfield") returns candidates and makes no data call. If zip_code is also given it wins and location is ignored.
zip_codeNoUS 5-digit ZIP code
distance_milesNoSearch radius for the nearest reporting area (default 25, max 250)

Output Schema

NameRequiredDescriptionDefault
countYesNumber of forecast records returned
forecastYesAQI forecasts for pollutants
zip_codeYesUS 5-digit ZIP code queried
requested_dateYesForecast date requested (YYYY-MM-DD or 'today')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / location
      Added value: +{
      +  "description": "Free-text place instead of a ZIP code: a city (\"Carnelian Bay, CA\"), landmark, address, county or \"10 miles north of Truckee\". Resolved to a center point; the answer echoes resolved_location {name, match_type, center, bbox} so you can refuse a match coarser than you need. An ambiguous name (\"Springfield\") returns candidates and makes no data call. If zip_code is also given it wins and location is ignored.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "zip_code"
      -]New value: +[]
  2. Changed3 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "zip_code": "10001"
      -  },
      -  {
      -    "date": "2025-01-15",
      -    "zip_code": "60601"
      -  }
      -]New value: +[
      +  {
      +    "zip_code": "10001"
      +  },
      +  {
      +    "distance_miles": 50,
      +    "zip_code": "60601"
      +  }
      +]
    • changedInput schema / properties / date / description
      Previous value: -"YYYY-MM-DD (default today)"New value: +"YYYY-MM-DD forecast day (default: every day AirNow has issued, today + up to 3)"
    • changedInput schema / properties / distance_miles / description
      Previous value: -"Search radius (default 25)"New value: +"Search radius for the nearest reporting area (default 25, max 250)"
  3. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "zip_code": "10001"
      +  },
      +  {
      +    "date": "2025-01-15",
      +    "zip_code": "60601"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "count": {
      +      "description": "Number of forecast records returned",
      +      "type": "integer"
      +    },
      +    "forecast": {
      +      "description": "AQI forecasts for pollutants",
      +      "items": {
      +        "properties": {
      +          "action_day": {
      +            "description": "Action day flag for air quality alert",
      +            "type": "boolean"
      +          },
      +          "aqi": {
      +            "description": "Forecasted Air Quality Index value",
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "category": {
      +            "description": "Forecasted AQI category",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "discussion": {
      +            "description": "Forecast discussion/explanation text",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "forecast_date": {
      +            "description": "Forecast date (YYYY-MM-DD)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "latitude": {
      +            "description": "Site latitude",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "longitude": {
      +            "description": "Site longitude",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "pollutant": {
      +            "description": "Pollutant name (e.g., O3, PM2.5)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "reporting_area": {
      +            "description": "Geographic area name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "state": {
      +            "description": "State code",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "requested_date": {
      +      "description": "Forecast date requested (YYYY-MM-DD or 'today')",
      +      "type": "string"
      +    },
      +    "zip_code": {
      +      "description": "US 5-digit ZIP code queried",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "zip_code",
      +    "requested_date",
      +    "count",
      +    "forecast"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds real behavioral context beyond that: the per-pollutant breakdown, the Action Day flag, the discussion text, the three-day horizon, the rule that zip_code wins over location, and that an ambiguous name returns candidates and makes no data call. It does not mention authentication or rate limits for the upstream AirNow service, which keeps it from a 5.

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?

Three sentences, front-loaded with the resource and scope, then the date behavior, then a concrete use case. Every sentence carries information an agent would act on, with no filler.

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

Completeness5/5

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

With an output schema present, return values need no explanation, and annotations plus full schema coverage handle safety and parameters. The description fills the remaining gaps: forecast horizon, pollutant granularity, the Action Day flag, discussion text, and the zip_code-over-location precedence. Nothing an agent needs to call it correctly is missing.

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 date, location, zip_code and distance_miles semantics are already fully documented in the input schema. The description's note about passing a date versus omitting it largely restates the schema's own default description, adding little new meaning. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose5/5

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

The description names a specific verb and resource: an EPA AirNow AQI forecast for a US ZIP code, per pollutant, including the category, Action Day flag and forecaster discussion. The contrast with the sibling current_by_zip is implicit in the word "forecast" plus the "today and up to three days ahead" scope, so an agent can distinguish them without opening either schema.

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

Usage Guidelines4/5

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

It gives clear usage conditions: pass a date to get one day, omit it for every day AirNow has issued, and it anchors the tool with a concrete question ("is tomorrow ok for outdoor activity in 60601"). It stops short of explicitly excluding alternatives (for example, telling the agent to use current_by_zip for present conditions or current_by_location for non-ZIP places), so the routing is left partly to inference.

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.