Skip to main content
Glama

Get Air Quality Index

epa_airnow_get_conditions
Read-onlyIdempotent

AirNow: Get current AQI observations or the issued AQI forecast for a US location from the AirNow API. Provide either zip_code or both latitude and longitude. Current mode returns the latest hourly NowCast AQI for each pollutant (PM2.5, ozone, PM10) from the closest monitor within 50 miles, with the monitor site name, site ID, and reporting agency; pollutants in one reporting area can come from different monitors. Forecast mode returns every day the reporting area's agency has issued (typically one to five), each with the AQI category, an action-day flag, and the issue date, plus the agency's forecast discussion when one exists; some agencies forecast a category without an AQI number. In forecast mode, set forecast_date to keep only the forecast valid on that date; current mode rejects it. Data are preliminary — suitable for awareness, not regulatory, trend, or enforcement decisions. Responses are cached for ~1 hour.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
modeNoData mode: "current" for the latest hourly observations, "forecast" for every forecast day the reporting area has issuedcurrent
latitudeNoLatitude in decimal degrees (use with longitude instead of zip_code)
zip_codeNoUS ZIP code for the location: 5 digits, or a ZIP+4 such as 98108-1234, which searches its first five digits
longitudeNoLongitude in decimal degrees (use with latitude instead of zip_code)
forecast_dateNoForecast mode only (rejected in current mode): keep just the forecast valid on this date (YYYY-MM-DD). Omit to get every issued forecast day. When no issued day matches, the result is empty and its message lists the issued dates.

Output Schema

NameRequiredDescriptionDefault
modeNoMode used: "current" or "forecast"
errorNoPresent when the call failed. Absent on success.
messageNoWhy the result is empty: AirNow's explanation, the issued forecast dates when forecast_date matched none, or a coverage hint; absent otherwise.
attributionNoCredit to the reporting or forecasting agencies and EPA AirNow, with the preliminary-data notice; reproduce it when passing this data on.
observationsNoRecords grouped by reporting area

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed26 schema fields changed
    • changedOutput schema / properties / attribution / description
      Previous value: -"Credit to the reporting or forecasting agencies and the U.S. EPA AirNow program, with the preliminary-data notice. Reproduce it when passing this data on."New value: +"Credit to the reporting or forecasting agencies and EPA AirNow, with the preliminary-data notice; reproduce it when passing this data on."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `no_location`: Neither zip_code nor latitude+longitude was provided. `forecast_date_needs_forecast_mode`: forecast_date was set while mode is \"current\", where it has no effect. `invalid_zip_code`: AirNow rejected zip_code as invalid (HTTP 400). Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `no_location`: Neither zip_code nor latitude+longitude was provided. `forecast_date_needs_forecast_mode`: forecast_date was set in \"current\" mode, where it has no effect. `invalid_zip_code`: AirNow rejected zip_code as invalid (HTTP 400). Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / message / description
      Previous value: -"Why the result is empty: AirNow's own explanation, the issued forecast dates when forecast_date matched none, or a coverage hint. Absent when data is returned."New value: +"Why the result is empty: AirNow's explanation, the issued forecast dates when forecast_date matched none, or a coverage hint; absent otherwise."
    • changedOutput schema / properties / mode / description
      Previous value: -"Data mode used: \"current\" or \"forecast\""New value: +"Mode used: \"current\" or \"forecast\""
    • changedOutput schema / properties / observations / description
      Previous value: -"AQI observation or forecast records grouped by reporting area"New value: +"Records grouped by reporting area"
    • changedOutput schema / properties / observations / items / description
      Previous value: -"AQI readings for one reporting area — per observed hour in current mode, per area across all forecast days in forecast mode"New value: +"One reporting area: per observed hour in current mode, across forecast days in forecast mode"
    • changedOutput schema / properties / observations / items / properties / dateObserved / description
      Previous value: -"Observation date (YYYY-MM-DD). Current mode only."New value: +"Observation date, YYYY-MM-DD. Current mode only."
    • changedOutput schema / properties / observations / items / properties / discussion / description
      Previous value: -"The forecasting agency's discussion for this area, verbatim (may contain HTML). Forecast mode only; omitted when the agency issued none."New value: +"Forecasting agency's discussion, verbatim (may contain HTML). Forecast mode only; absent when none was issued."
    • changedOutput schema / properties / observations / items / properties / hourObserved / description
      Previous value: -"Local hour of the observation as \"HH:00\". Current mode only."New value: +"Local hour as \"HH:00\". Current mode only."
    • changedOutput schema / properties / observations / items / properties / localTimeZone / description
      Previous value: -"Local time zone abbreviation for hourObserved (e.g. \"PDT\"). Current mode only."New value: +"Time zone abbreviation for hourObserved. Current mode only."
    • changedOutput schema / properties / observations / items / properties / readings / description
      Previous value: -"Per-pollutant AQI readings for this reporting area"New value: +"Per-pollutant readings"
    • changedOutput schema / properties / observations / items / properties / readings / items / description
      Previous value: -"AQI reading for one pollutant (and, in forecast mode, one valid date)"New value: +"AQI for one pollutant (and, in forecast mode, one valid date)"
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / actionDay / description
      Previous value: -"True when the agency declared an air quality action day for this date. Forecast mode only."New value: +"True when the agency declared an air quality action day. Forecast mode only."
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / aqi / description
      Previous value: -"Air Quality Index value. Omitted when the agency issued only a category (category-only forecast)."New value: +"Air Quality Index value; absent for a category-only forecast"
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / categoryName / description
      Previous value: -"AQI category name (e.g. \"Good\", \"Moderate\", \"Unhealthy\")"New value: +"AQI category name"
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / categoryNumber / description
      Previous value: -"AQI category number: 1=Good, 2=Moderate, 3=Unhealthy for Sensitive Groups, 4=Unhealthy, 5=Very Unhealthy, 6=Hazardous. Omitted when AirNow reports an unrecognized category."New value: +"1 Good, 2 Moderate, 3 Unhealthy for Sensitive Groups, 4 Unhealthy, 5 Very Unhealthy, 6 Hazardous; absent if unrecognized"
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / dateIssue / description
      Previous value: -"Date the forecast was issued (YYYY-MM-DD). Forecast mode only."New value: +"Forecast issue date, YYYY-MM-DD. Forecast mode only."
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / dateValid / description
      Previous value: -"Date the forecast applies to (YYYY-MM-DD). Forecast mode only."New value: +"Date the forecast applies to, YYYY-MM-DD. Forecast mode only."
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / forecastAgency / description
      Previous value: -"Agency that issued the forecast. Forecast mode only."New value: +"Forecasting agency. Forecast mode only."
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / parameterName / description
      Previous value: -"Pollutant name as AirNow reports it (e.g. \"PM2.5\", \"OZONE\", \"PM10\")"New value: +"Pollutant name as AirNow reports it"
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / reportingAgency / description
      Previous value: -"Agency that reported this observation. Current mode only."New value: +"Reporting agency. Current mode only."
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / siteID / description
      Previous value: -"AirNow ID of the monitor site. Current mode only."New value: +"AirNow monitor site ID. Current mode only."
    • changedOutput schema / properties / observations / items / properties / readings / items / properties / siteName / description
      Previous value: -"Monitor site that produced this observation. Current mode only."New value: +"Monitor site name. Current mode only."
    • changedOutput schema / properties / observations / items / properties / reportingArea / description
      Previous value: -"Name of the AQI reporting area (e.g. \"Seattle-Bellevue-Kent Valley\")"New value: +"AQI reporting area name"
    • changedOutput schema / properties / observations / items / properties / reportingAreaCode / description
      Previous value: -"AirNow reporting area code (e.g. \"wa004\"). Forecast mode only."New value: +"AirNow reporting area code. Forecast mode only."
    • changedOutput schema / properties / observations / items / properties / stateCode / description
      Previous value: -"2-letter state code of the reporting area. Forecast mode only."New value: +"2-letter state code. Forecast mode only."
  2. Changed3 schema fields changed
    • addedInput schema / properties / forecast_date / pattern
      Added value: +"^\\s*(?:\\d{4}-\\d{2}-\\d{2}\\s*)?$"
    • changedInput schema / properties / zip_code / description
      Previous value: -"5-digit US ZIP code for the location"New value: +"US ZIP code for the location: 5 digits, or a ZIP+4 such as 98108-1234, which searches its first five digits"
    • addedInput schema / properties / zip_code / pattern
      Added value: +"^\\s*(?:\\d{5}(?:-?\\d{4})?\\s*)?$"
  3. Changed4 schema fields changed
    • addedInput schema / properties / latitude / maximum
      Added value: +90
    • addedInput schema / properties / latitude / minimum
      Added value: +-90
    • addedInput schema / properties / longitude / maximum
      Added value: +180
    • addedInput schema / properties / longitude / minimum
      Added value: +-180
  4. Added

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and openWorld, so the safety profile is covered. The description still adds real behavioral context beyond them: preliminary data status, a ~1 hour cache, the 50-mile monitor radius, mixed-monitor reporting, and the empty-result message behavior. That is solid added value, though it omits pagination/limit behavior and what happens when no monitor is within 50 miles.

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?

The purpose and location requirement are front-loaded, then the paragraph walks through current mode, forecast mode, and caveats in a logical order with no filler. It is dense and semicolon-heavy, which slightly slows scanning, but nearly every clause carries information an agent needs.

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, the description needn't describe return values, and it covers the remaining gaps: mode semantics, location input rules, forecast_date scoping, per-mode result contents, data quality caveats, and caching. An agent has everything required to call this correctly.

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 baseline is 3 and the schema already documents each field's format and bounds. The description adds the non-obvious constraint that zip_code is an alternative to the latitude/longitude pair (the schema marks nothing required) and reinforces that forecast_date is rejected in current mode.

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 opening sentence gives a specific verb and resource ('Get current AQI observations or the issued AQI forecast ... from the AirNow API') and immediately disambiguates the two modes. It never names or contrasts a sibling tool, but the resource is distinct enough from the EPA ECHO/EJScreen/TRI/water tools that confusion is unlikely.

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 states the location requirement ('Provide either zip_code or both latitude and longitude'), the mode-selection rule, and a fitness caveat ('suitable for awareness, not regulatory, trend, or enforcement decisions'). It stops short of naming an alternative tool for cases this one doesn't fit, so there is no explicit routing guidance.

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.