Skip to main content
Glama

Current By Location

current_by_location
Read-onlyIdempotent

Latest observed air quality index (AQI) for the EPA AirNow reporting area nearest a latitude/longitude in the US: one row per pollutant with AQI value, category, observation hour, agency and yesterday's AQI. Answers "what is the air quality at these coordinates 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": {
      "latitude": 40.7128,
      "longitude": -74.006
    },
    "name": "current_by_location"
  }
}

Input Schema

NameRequiredDescriptionDefault
latitudeNoUS latitude
locationNoFree-text place instead of latitude and longitude: 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 latitude and longitude is also given it wins and location is ignored.
longitudeNoUS longitude
distance_milesNoSearch radius for the nearest reporting area (default 25, max 250)

Output Schema

NameRequiredDescriptionDefault
countYesNumber of observations returned
latitudeYesQuery latitude
longitudeYesQuery longitude
observationsYesLatest AQI observations for nearest station

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 latitude and longitude: 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 latitude and longitude is also given it wins and location is ignored.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "latitude",
      -  "longitude"
      -]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: +[
      +  {
      +    "latitude": 40.7128,
      +    "longitude": -74.006
      +  },
      +  {
      +    "distance_miles": 100,
      +    "latitude": 34.0522,
      +    "longitude": -118.2437
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "count": {
      +      "description": "Number of observations returned",
      +      "type": "integer"
      +    },
      +    "latitude": {
      +      "description": "Query latitude",
      +      "type": "number"
      +    },
      +    "longitude": {
      +      "description": "Query longitude",
      +      "type": "number"
      +    },
      +    "observations": {
      +      "description": "Latest AQI observations for nearest station",
      +      "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"
      +    }
      +  },
      +  "required": [
      +    "latitude",
      +    "longitude",
      +    "count",
      +    "observations"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/open-world safety, and the description adds real behavior on top: per-pollutant row granularity, field contents (category, observation hour, agency, yesterday's AQI), the resolved_location echo, that an ambiguous name returns candidates with no data call, and that latitude/longitude overrides location. That is exactly the kind of resolution/fallback semantics annotations cannot express.

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?

Two sentences, front-loaded with the resource and return shape, followed by a single use-case tagline. Every clause carries distinct information (area binding, row granularity, fields, usage trigger) with no filler.

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?

With an output schema present and 100% parameter coverage, the definition needs only the scope and resolution caveats, and it supplies those (nearest-area search, ambiguous-name handling, lat/long precedence). The only minor gap is no mention of behavior when no reporting area is within the radius, which matters for a 4-parameter location tool.

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% and the parameter-level text already documents latitude, longitude, location resolution, and distance_miles. The top-level description adds little parameter meaning beyond restating that a coordinate pair resolves to the nearest reporting area, so the baseline of 3 is appropriate.

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?

States a specific verb+resource ('Latest observed air quality index ... for the EPA AirNow reporting area nearest a latitude/longitude in the US') plus the exact return shape (one row per pollutant). The coordinates-based binding implicitly separates it from zip-based siblings like current_by_zip and from forecast_by_zip, so an agent can route without opening the 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?

The quoted trigger 'what is the air quality at these coordinates right now' gives a clear usage context and 'latest observed' rules out forecasting. It stops short of explicitly naming alternatives (e.g. zip lookups, forecasts) or stating when not to use it, so it lands at clear-context-without-exclusions rather than a full routing rule.

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.