Skip to main content
Glama

Get Latest

get_latest
Read-onlyIdempotent

Get the latest reading for every pollutant at a specific OpenAQ station (by location id from find_stations). Returns each parameter (PM2.5, O3, NO2, etc.) with its value, units, and measurement time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_apiKeyNoOpenAQ API key (optional; the gateway supplies one).
location_idYesOpenAQ location/station id (from find_stations or air_quality_near).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of stations returned
stationsYesList of air quality stations with latest measurements

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "country": "US",
      -    "limit": 10
      -  },
      -  {
      -    "country": "IN",
      -    "limit": 25
      -  }
      -]New value: +[
      +  {
      +    "location_id": 1575
      +  },
      +  {
      +    "location_id": 1019
      +  }
      +]
  2. Changed5 schema fields changed
    • addedInput schema / properties / _apiKey
      Added value: +{
      +  "description": "OpenAQ API key (optional; the gateway supplies one).",
      +  "type": "string"
      +}
    • removedInput schema / properties / country
      Removed value: -{
      -  "description": "ISO 3166-1 alpha-2 country code to filter by (e.g. \"US\", \"GB\", \"DE\").",
      -  "type": "string"
      -}
    • removedInput schema / properties / limit
      Removed value: -{
      -  "description": "Maximum number of station results to return (default 10, max 100).",
      -  "type": "number"
      -}
    • addedInput schema / properties / location_id
      Added value: +{
      +  "description": "OpenAQ location/station id (from find_stations or air_quality_near).",
      +  "type": "number"
      +}
    • changedInput schema / required
      Previous value: -[]New value: +[
      +  "location_id"
      +]
  3. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "country": "US",
      +    "limit": 10
      +  },
      +  {
      +    "country": "IN",
      +    "limit": 25
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "count": {
      +      "description": "Number of stations returned",
      +      "type": "number"
      +    },
      +    "stations": {
      +      "description": "List of air quality stations with latest measurements",
      +      "items": {
      +        "properties": {
      +          "city": {
      +            "description": "City where station is located",
      +            "type": "string"
      +          },
      +          "coordinates": {
      +            "properties": {
      +              "latitude": {
      +                "description": "Latitude coordinate",
      +                "type": "number"
      +              },
      +              "longitude": {
      +                "description": "Longitude coordinate",
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "latitude",
      +              "longitude"
      +            ],
      +            "type": "object"
      +          },
      +          "country": {
      +            "description": "Country where station is located",
      +            "type": "string"
      +          },
      +          "location": {
      +            "description": "Station location name",
      +            "type": "string"
      +          },
      +          "measurements": {
      +            "description": "Current pollutant measurements",
      +            "items": {
      +              "properties": {
      +                "lastUpdated": {
      +                  "description": "ISO timestamp of last update",
      +                  "type": "string"
      +                },
      +                "parameter": {
      +                  "description": "Pollutant parameter name",
      +                  "type": "string"
      +                },
      +                "unit": {
      +                  "description": "Unit of measurement",
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "description": "Measured value",
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "parameter",
      +                "value",
      +                "unit",
      +                "lastUpdated"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "location",
      +          "city",
      +          "country",
      +          "coordinates",
      +          "measurements"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "count",
      +    "stations"
      +  ],
      +  "type": "object"
      +}
  4. Changed2 schema fields changed
    • removedInput schema / examples
      Removed value: -[
      -  {
      -    "country": "US",
      -    "limit": 10
      -  },
      -  {
      -    "country": "IN",
      -    "limit": 25
      -  }
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "count": {
      -      "description": "Number of stations returned",
      -      "type": "number"
      -    },
      -    "stations": {
      -      "description": "List of air quality stations with latest measurements",
      -      "items": {
      -        "properties": {
      -          "city": {
      -            "description": "City where station is located",
      -            "type": "string"
      -          },
      -          "coordinates": {
      -            "properties": {
      -              "latitude": {
      -                "description": "Latitude coordinate",
      -                "type": "number"
      -              },
      -              "longitude": {
      -                "description": "Longitude coordinate",
      -                "type": "number"
      -              }
      -            },
      -            "required": [
      -              "latitude",
      -              "longitude"
      -            ],
      -            "type": "object"
      -          },
      -          "country": {
      -            "description": "Country where station is located",
      -            "type": "string"
      -          },
      -          "location": {
      -            "description": "Station location name",
      -            "type": "string"
      -          },
      -          "measurements": {
      -            "description": "Current pollutant measurements",
      -            "items": {
      -              "properties": {
      -                "lastUpdated": {
      -                  "description": "ISO timestamp of last update",
      -                  "type": "string"
      -                },
      -                "parameter": {
      -                  "description": "Pollutant parameter name",
      -                  "type": "string"
      -                },
      -                "unit": {
      -                  "description": "Unit of measurement",
      -                  "type": "string"
      -                },
      -                "value": {
      -                  "description": "Measured value",
      -                  "type": "number"
      -                }
      -              },
      -              "required": [
      -                "parameter",
      -                "value",
      -                "unit",
      -                "lastUpdated"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          }
      -        },
      -        "required": [
      -          "location",
      -          "city",
      -          "country",
      -          "coordinates",
      -          "measurements"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "count",
      -    "stations"
      -  ],
      -  "type": "object"
      -}New value: +null
  5. Added
  6. Removed
  7. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, and destructiveHint, so the description's role is lighter. It adds value by specifying the return format (parameter, value, units, time), which is beyond the annotations. No contradictions.

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 concise sentences with no filler. The main action and key details are front-loaded. Every sentence earns its place.

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 need not detail return values. It covers input parameters, prerequisites (find_stations), and the overall goal. Complete for a simple read-only tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds meaning by explaining the location_id originates from find_stations and noting the _apiKey is optional. This exceeds the baseline expectation for high schema coverage.

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 retrieves the latest reading for every pollutant at a specific OpenAQ station, specifying the resource (pollutant readings) and distinguishing it from siblings like get_measurements which likely returns historical data.

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 provides clear context on when to use (for latest readings at a station) and directs users to obtain location_id from find_stations. However, it does not explicitly exclude alternative tools or mention when not to use.

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.