Skip to main content
Glama

Geo-Insights Environmental Data

Get Historical Readings

get_readings_history
Read-onlyIdempotent

Get historical environmental readings near a location over a time range.

Use this for trend analysis, comparisons, and time-series queries.
Unlike get_latest_readings (which returns only the most recent value),
this returns multiple observations per station within the time window.

Args:
    lat: Latitude in WGS84 (e.g. 51.92 for Rotterdam)
    lon: Longitude in WGS84 (e.g. 4.47 for Rotterdam)
    parameter: Parameter name or alias (required — e.g. "temperature",
               "pm25", "no2"). Use get_parameters() for valid names.
    start: Start of time range in ISO 8601 (e.g. "2026-11-01T00:00:00Z")
    end: End of time range in ISO 8601 (default: now)
    radius_km: Search radius in kilometers (greater than 0, at most 50; default 10)
    limit: Maximum readings per station (at least 1; default 100, capped at 1000)

Returns up to 100 stations, nearest first, each with distance_km and a
time-ordered array of readings, plus parameter info and the actual time
range covered. end must be after start; the window is at most 30 days.

Hosts that support MCP Apps render this as an interactive chart; other
clients receive the same structured result as plain data.

Invalid coordinates, radius, limit, unrecognized parameters, or unparseable
dates return a structured error. Data source errors carry "retryable": 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>",
      "parameter": "<parameter>",
      "start": "<start>"
    },
    "name": "get_readings_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
latYes
lonYes
limitNo
startYes
parameterYes
radius_kmNo

Output Schema

NameRequiredDescriptionDefault
stationsYes
parameterYes
truncatedNoMore datastreams lie in the radius than one query can scan; results may miss some nearby stations. Narrow the radius or add a parameter.
period_endYes
period_startYes
total_readingsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / $defs / StationHistory / 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. Added

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, non-destructive, open-world), and the description adds genuinely new behavior: nearest-first ordering, a 30-day maximum window, end-must-be-after-start validation, per-station limit caps at 1000, and structured errors with a 'retryable' flag where false means retrying won't help. It does not quantify rate limits or explain how 'nearest first' interacts with the station cap when more than 100 stations qualify, so it stops just short of full transparency.

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 description is front-loaded with purpose and the sibling contrast, then organized into Args and Returns blocks, so it scans well. It is longer than typical, but almost every line adds a constraint or format detail the schema lacks — only the MCP Apps rendering note and part of the Returns block are somewhat redundant given the output schema.

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 seven-parameter, four-required, read-only query tool with an output schema, the agent has everything it needs: valid ranges, defaults, date format, parameter resolution path, result shape (station distance plus time-ordered readings), and error semantics. Return-value detail overlaps the output schema but does not harm completeness.

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?

With 0% schema description coverage, the description carries the entire burden, and it does: coordinate system (WGS84) with worked examples, parameter aliases plus a pointer to get_parameters(), ISO 8601 format with an example for start, end defaulting to now, radius bounds (>0, ≤50, default 10), and limit bounds (≥1, default 100, capped 1000). That covers all seven parameters with constraints the bare JSON schema does not express.

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 first sentence states a specific verb and resource ('Get historical environmental readings') plus two scoping dimensions (location, time range). The second paragraph explicitly contrasts it with get_latest_readings, so an agent can distinguish 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 names concrete use cases ('trend analysis, comparisons, and time-series queries') and explicitly routes the agent to get_parameters() for valid parameter names. It also states the alternative interpretation — get_latest_readings for only the most recent value — giving both when-to-use and when-not-to-use guidance.

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