Skip to main content
Glama

Geo-Insights Environmental Data

Get Latest Environmental Readings

get_latest_readings
Read-onlyIdempotent

Get the most recent environmental readings near a location.

Args:
    lat: Latitude in WGS84 (e.g. 51.92 for Rotterdam)
    lon: Longitude in WGS84 (e.g. 4.47 for Rotterdam)
    radius_km: Search radius in kilometers (default 10, max 50)
    parameter: Optional filter by parameter name or alias (e.g. "pm2_5",
               "temperature", "pm25", "no2"). Use get_parameters() to see
               all valid names and aliases.
    limit: Maximum number of readings to return (default 100, max 500)

Returns the single most recent reading per datastream within the radius.
Each reading includes parameter, value, unit, timestamp, station_name,
lat, lon, source, and source_attribution.

For time-range queries, use get_readings_history instead.

Invalid coordinates return an error with the valid ranges.
An unrecognized parameter returns an error with the full list of valid names.
If the data source is unreachable, returns cause (timeout, circuit_breaker_open)
and retry_after_seconds.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "lat": "<lat>",
      "lon": "<lon>"
    },
    "name": "get_latest_readings"
  }
}

Input Schema

NameRequiredDescriptionDefault
latYes
lonYes
limitNo
parameterNo
radius_kmNo

Output Schema

NameRequiredDescriptionDefault
countYes
readingsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedOutput schema / $defs
      Added value: +{
      +  "Reading": {
      +    "properties": {
      +      "lat": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Lat"
      +      },
      +      "lon": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Lon"
      +      },
      +      "parameter": {
      +        "title": "Parameter",
      +        "type": "string"
      +      },
      +      "source": {
      +        "title": "Source",
      +        "type": "string"
      +      },
      +      "source_attribution": {
      +        "title": "Source Attribution",
      +        "type": "string"
      +      },
      +      "station_name": {
      +        "title": "Station Name",
      +        "type": "string"
      +      },
      +      "timestamp": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Timestamp"
      +      },
      +      "unit": {
      +        "title": "Unit",
      +        "type": "string"
      +      },
      +      "value": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Value"
      +      }
      +    },
      +    "required": [
      +      "parameter",
      +      "unit",
      +      "station_name",
      +      "source",
      +      "source_attribution"
      +    ],
      +    "title": "Reading",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / count
      Added value: +{
      +  "title": "Count",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / readings
      Added value: +{
      +  "items": {
      +    "$ref": "#/$defs/Reading"
      +  },
      +  "title": "Readings",
      +  "type": "array"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "title": "Result",
      -  "type": "string"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "readings",
      +  "count"
      +]
    • changedOutput schema / title
      Previous value: -"get_latest_readingsOutput"New value: +"ReadingsResult"
  2. 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 readOnly, idempotent, openWorld, non-destructive, so safety is covered; the description adds genuine behavioral context by describing the error surface: invalid coordinate ranges, unrecognized parameter errors listing valid names, and unreachable-source errors carrying cause (timeout, circuit_breaker_open) and retry_after_seconds. That retry hint is the kind of operational detail 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then returns, then failure modes, which is the right order. The Args block partially restates schema fields, but each line contributes a max bound, coordinate system, or example that the schema lacks, so the length is largely earned.

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?

For a 5-parameter read tool with annotations and an output schema, nothing material is missing: return record fields are summarized, failure modes enumerated, and sibling routing provided. The description is sufficient to call the tool correctly on the first attempt.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the load and it does: WGS84 coordinate system with a concrete example, radius default 10 and max 50, limit default 100 and max 500, and an explanation that parameter accepts names or aliases with examples. The max bounds and alias behavior are not in the schema at all.

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 and resource ("Get the most recent environmental readings near a location") and pins down the scope as the latest-per-datastream view, which is directly contrasted with get_readings_history for time ranges. An agent can distinguish this from its siblings 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?

Explicitly routes time-range queries to get_readings_history and points to get_parameters() for valid parameter names. What's missing is guidance on when to use this versus spatial siblings like get_context_summary or lookup_municipality, but the primary ambiguity is resolved.

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.

Resources