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 (greater than 0, at most 50; default 10)
    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 (at least 1; default 100,
           values above 500 are capped at 500)

Returns the single most recent reading per datastream within the radius,
nearest first. Each reading includes parameter, value, unit, timestamp,
station_name, lat, lon, distance_km, source, and source_attribution.
truncated=true means more datastreams lie in the radius than one query can
scan: narrow the radius or add a parameter.

For time-range queries, use get_readings_history instead.

Invalid coordinates, radius or limit return an error with the valid ranges.
An unrecognized parameter returns an error with the full list of valid names.
Errors carry "retryable": if true (timeout, circuit_breaker_open) wait
retry_after_seconds; if false (query_rejected) retrying will not help.

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
truncatedNoMore datastreams lie in the radius than one query can scan; results may miss some nearby stations. Narrow the radius or add a parameter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / $defs / Reading / properties / distance_km
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Distance from the requested point",
      +  "title": "Distance Km"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "default": false,
      +  "description": "More datastreams lie in the radius than one query can scan; results may miss some nearby stations. Narrow the radius or add a parameter.",
      +  "title": "Truncated",
      +  "type": "boolean"
      +}
  2. 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"
  3. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), so the bar is lower, yet the description still adds real behavioral detail: one reading per datastream, nearest-first ordering, the meaning of truncated=true, and an error model with retryable and retry_after_seconds. It is close to a 5; the only gap is that it does not say how to page past truncated results beyond 'narrow the radius or add a parameter'.

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?

The structure is front-loaded and the Args block is easy to scan, with the sibling redirect and truncation note placed where they are needed. It is slightly verbose in restating defaults and ranges that also appear in the schema, and the trailing error paragraph could be tightened, but no sentence is wasted.

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 five-parameter geospatial query with an output schema, this covers everything an agent needs: units, bounds, defaults, filtering semantics, ordering, the truncation escape hatch, and error retryability. The return-shape sentence is technically redundant with the output schema but costs little and aids selection.

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 all meaning, and it does: WGS84 units with concrete coordinate examples, radius bounds (greater than 0, at most 50, default 10), limit bounds and the 500 cap, and parameter alias examples like 'pm25' vs 'pm2_5'. This adds substantially more than the bare schema types.

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 opening sentence gives a specific verb and resource ('Get the most recent environmental readings') plus the geographic scope ('near a location'). It also names the sibling it is not (get_readings_history) for time-range work, so an agent can separate the two without opening either schema.

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

Usage Guidelines5/5

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

It explicitly routes the agent: time-range queries go to get_readings_history, and valid parameter names come from get_parameters(). It also states the remedy for the truncated case (narrow the radius or add a parameter), which is a usage decision, not just a fact.

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