Skip to main content
Glama

Current By Zip

current_by_zip
Read-onlyIdempotent

Latest observed air quality index (AQI) for the EPA AirNow reporting area nearest a US ZIP code: one row per pollutant (ozone, PM2.5, PM10) with the AQI value, category (Good / Moderate / Unhealthy ...), observation hour, reporting agency and yesterday's AQI for comparison. Answers "what is the air quality in ZIP 94103 right now".

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": "current_by_zip"
  }
}

Input Schema

NameRequiredDescriptionDefault
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 observations returned
zip_codeYesUS 5-digit ZIP code queried
observationsYesLatest AQI observations for pollutants at nearest site

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. Changed1 schema field changed
    • changedInput schema / properties / distance_miles / description
      Previous value: -"Search radius (default 25, max 250)"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"
      +  },
      +  {
      +    "distance_miles": 50,
      +    "zip_code": "90210"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "count": {
      +      "description": "Number of observations returned",
      +      "type": "integer"
      +    },
      +    "observations": {
      +      "description": "Latest AQI observations for pollutants at nearest site",
      +      "items": {
      +        "properties": {
      +          "aqi": {
      +            "description": "Air Quality Index value",
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "category": {
      +            "description": "AQI category (Good, Moderate, etc.)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "category_number": {
      +            "description": "AQI category numeric code",
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "date": {
      +            "description": "Date observed (YYYY-MM-DD)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "hour": {
      +            "description": "Hour observed (0-23)",
      +            "type": [
      +              "integer",
      +              "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"
      +            ]
      +          },
      +          "timezone": {
      +            "description": "Local time zone",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "zip_code": {
      +      "description": "US 5-digit ZIP code queried",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "zip_code",
      +    "count",
      +    "observations"
      +  ],
      +  "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 read-only, idempotent, non-destructive, and open-world behavior, so the safety profile is covered. The description adds useful behavioral context: results are one row per pollutant, include observation hour and reporting agency, and include yesterday's AQI for comparison. It does not discuss rate limits or failure behavior when no reporting area is found, but those are secondary given the annotations and output schema.

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 front-loaded with the core behavior and then lists the returned fields and a representative question. It is dense but efficient, with no redundant or filler wording.

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?

The tool has an output schema and rich annotations, so the description does not need to explain return values or safety behavior. It still provides enough context about pollutant granularity, nearest-area resolution, and comparison data to call the tool 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 schema already explains zip_code, location, and distance_miles in detail. The description does not add parameter-specific meaning beyond what the schema provides, which is acceptable 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 states a specific verb and resource: retrieves the latest observed AQI for the EPA AirNow reporting area nearest a US ZIP code. It clarifies the row granularity by pollutant and names the concrete fields returned, making the tool distinguishable from a forecast or location-based lookup.

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?

The description gives a clear use case with the example question 'what is the air quality in ZIP 94103 right now,' so an agent knows this is the current-observation tool. It does not explicitly name when to use forecast_by_zip or current_by_location instead, so the alternative-selection guidance is implicit rather than complete.

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.