Skip to main content
Glama

Get Aqi By Location

get_aqi_by_location
Read-onlyIdempotent

Real-time AQI for the WAQI station nearest a lat/lon.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latitudeYesLatitude
longitudeYesLongitude

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
aqiYesAir Quality Index value
stationYes
categoryYesAQI category (Good/Moderate/Unhealthy/Hazardous)
timezoneYesTimezone of station
measured_atYesISO timestamp of measurement
attributionsYesData sources and attributions
measurementsYes
dominant_pollutantYesPrimary pollutant causing poor air quality

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "latitude": 40.7128,
      +    "longitude": -74.006
      +  },
      +  {
      +    "latitude": 28.7041,
      +    "longitude": 77.1025
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "aqi": {
      +      "description": "Air Quality Index value",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "attributions": {
      +      "description": "Data sources and attributions",
      +      "items": {
      +        "properties": {
      +          "name": {
      +            "description": "Attribution source name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "url": {
      +            "description": "Attribution source URL",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "category": {
      +      "description": "AQI category (Good/Moderate/Unhealthy/Hazardous)",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "dominant_pollutant": {
      +      "description": "Primary pollutant causing poor air quality",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "measured_at": {
      +      "description": "ISO timestamp of measurement",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "measurements": {
      +      "properties": {
      +        "co": {
      +          "description": "Carbon monoxide in µg/m³",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "humidity_pct": {
      +          "description": "Humidity percentage",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "no2": {
      +          "description": "Nitrogen dioxide in µg/m³",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "o3": {
      +          "description": "Ozone concentration in µg/m³",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "pm10": {
      +          "description": "PM10 concentration in µg/m³",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "pm25": {
      +          "description": "PM2.5 concentration in µg/m³",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "pressure_hpa": {
      +          "description": "Atmospheric pressure in hPa",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "so2": {
      +          "description": "Sulfur dioxide in µg/m³",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "temperature_c": {
      +          "description": "Temperature in Celsius",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "wind_speed": {
      +          "description": "Wind speed",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "station": {
      +      "properties": {
      +        "id": {
      +          "description": "Station identifier",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "latitude": {
      +          "description": "Station latitude",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "longitude": {
      +          "description": "Station longitude",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "description": "Station/city name",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "url": {
      +          "description": "Station information URL",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "timezone": {
      +      "description": "Timezone of station",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "aqi",
      +    "category",
      +    "dominant_pollutant",
      +    "station",
      +    "measurements",
      +    "measured_at",
      +    "timezone",
      +    "attributions"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering safety. The description adds value by specifying 'Real-time' and 'nearest' behavior, giving context about data freshness and station selection logic. No contradiction with annotations.

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 a single, front-loaded sentence that conveys the essential information without any filler. Every word is useful, making it highly concise and well-structured.

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?

This is a simple two-parameter tool with an output schema present, so the description does not need to explain return values. It sufficiently covers the tool's behavior for practical use, though it omits potential edge cases like 'no station found,' which is acceptable for this complexity level.

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?

The input schema has 100% coverage with descriptions ('Latitude' and 'Longitude'), so the baseline is 3. The description only mentions 'lat/lon' without adding extra details like units or ranges. It does not meaningfully enhance the schema's minimal parameter descriptions.

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 clearly states the tool provides real-time AQI from the WAQI station nearest a given lat/lon. This specifies the verb (get AQI), the resource (WAQI station), and the selection mechanism (nearest to coordinates), which distinguishes it from sibling tools like get_aqi_by_city and get_aqi_by_station.

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

Usage Guidelines3/5

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

The description implies usage when a user has latitude and longitude coordinates, but it does not explicitly mention alternatives or when not to use this tool. Sibling tools exist for city and station queries, but the description does not reference them, leaving the choice to the agent's 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.