Skip to main content
Glama

openaq-mcp-server: get measurements

openaq_get_measurements
Read-onlyIdempotent

Historical measurement series for one pollutant at one station over a date range — for trend analysis and "was last week worse than the monthly average?". Pass a locationId and a parametersId and work in stations — you get the series for that pollutant at that station. Choose aggregation: raw (every reported value), hourly, or daily — daily and hourly add a per-bucket statistical summary (min, median, max, mean, sd). A date-only bound means the station's local calendar day. Large ranges produce thousands of rows and stage on a DataCanvas: the response returns a preview plus a canvasId and table name — call openaq_dataframe_describe on the canvasId for the table's columns, then openaq_dataframe_query to run SQL over it. Passing a canvas_id stages the series there whatever its size, so two stations land on one canvas for a side-by-side comparison. Values carry their unit; the server never converts between µg/m³, ppm, and ppb.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax rows per page from the API (1–1000). Default 1000. The tool pages internally up to the 5000-row pull ceiling.
canvas_idNoDataCanvas id from a prior openaq_get_measurements call, to put this series on the same canvas (e.g. to compare two stations' series side by side). Supplying it stages the series whatever its size. Reuse stages one table per sensor, so a second sensor adds a table while the same sensor overwrites its earlier series — the response says so when that happens. Omit to start fresh; the response returns a new canvas_id when the series overflows the inline preview.
datetimeToNoEnd of the range, inclusive. A date "YYYY-MM-DD" covers that whole station-local day, closing at the next local midnight, so a DST day spans 23 or 25 hours; a full UTC "YYYY-MM-DDTHH:MM:SSZ" is sent as is. Must land after datetimeFrom — the two forms mix freely, so "2026-06-25" to "2026-06-25" is a valid one-day range. Omit for "up to now". effectiveRange echoes the instant sent.
locationIdYesStation id from openaq_find_locations.
aggregationNoTime bucketing. "raw" = every reported value (often hourly at source). "hourly"/"daily" = server-side rollups with a statistical summary per bucket; an hour is labeled by the time it ends, and a day is the station's local calendar day. Use "daily" for multi-month trends to keep the series small; "raw" for fine-grained recent analysis.raw
datetimeFromNoStart of the range, inclusive. A date "YYYY-MM-DD" opens at local midnight of that day in the station's timezone (UTC midnight when OpenAQ lists none); a full UTC "YYYY-MM-DDTHH:MM:SSZ" is sent as is. Omit to start from the sensor's earliest data — the series runs oldest first, so on a long-running station an open start fills the row cap with its oldest values; set datetimeFrom to reach recent ones. effectiveRange echoes the instant sent.
parametersIdYesParameter id to pull the series for (e.g. 2 = PM2.5 µg/m³). Get ids from openaq_list_parameters. Must be a parameter the station measures — find_locations lists each station's parameters.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
gapsNoThe first 20 missing intervals, oldest first. Omitted when gapCount is 0.
errorNoPresent when the call failed. Absent on success.
noticeNoWhat limited this response or where the rest of it lives — the row cap, a failed page, a station with no timezone, an edge bucket clipped by the range, missing intervals, DataCanvas being unavailable, or the canvas table the series was staged on and the tools that read it.
seriesNoThe (possibly previewed) series in the order OpenAQ returns it (oldest first). An hourly/daily series either skips a missing bucket or returns it with a null value — gapCount and gaps report both. Every row here is also rendered in the text output. When truncated, this is a preview of pulledCount rows — query canvasId for the rest.
canvasIdNoDataCanvas id holding the staged series — pulledCount rows of it. Call openaq_dataframe_describe on this id for the table's columns, then openaq_dataframe_query to run SQL. Present whenever staging succeeded, which includes a series that fit inline on a canvas_id you supplied.
gapCountNoMissing intervals inside an hourly or daily series — a span between buckets that do not touch, or a bucket with a null value, merged where contiguous — counted over every pulled row, not only the preview. 0 when nothing is missing; absent for raw, whose rows follow no fixed cadence.
locationNoStation the series came from
rowCountNoRows in this response (preview length when spilled)
sensorIdNoResolved sensor id the series was pulled from
parameterNoWhat was measured, resolved from the station's sensor
tableNameNoCanvas table holding the staged series (e.g. "measurements_1701"). openaq_dataframe_describe lists its columns; reference this name in openaq_dataframe_query SQL. One table per sensor, so re-staging the same sensor on this canvas overwrites it.
truncatedNoTrue when the series exceeded the inline limit, so series is a preview of the pulled rows. Absent/false when every pulled row is inline. It describes the preview only — canvasId reports whether the rows were staged, and pullComplete whether the pull itself finished.
totalCountNoRows in the full series for this range. A floor rather than an exact count when totalCountIsLowerBound is set; never below pulledCount.
aggregationNoBucketing applied
pulledCountNoRows pulled from OpenAQ, at most 5000 — the canvas table's row count when canvasId is present. Equals rowCount when the whole series fit inline; larger when series is a preview.
pullCompleteNoTrue when pulledCount is the whole series for the requested range. False when the 5000-row cap or a failed page stopped the pull early — the rows past that point are in neither this response nor the canvas table, and the notice says how to reach them.
effectiveRangeNoThe range sent to OpenAQ as UTC instants — date-only bounds expanded to the station's local day.
totalCountIsLowerBoundNoSet when totalCount is only a floor: the pull stopped early and OpenAQ reported the range total as ">N" instead of an exact number, so more rows exist than totalCount states. Absent when the count is exact.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changed
    • changedInput schema / properties / aggregation / description
      Previous value: -"Time bucketing. \"raw\" = every reported value (often hourly at source). \"hourly\"/\"daily\" = server-side rollups with a statistical summary per bucket. Use \"daily\" for multi-month trends to keep the series small; \"raw\" for fine-grained recent analysis."New value: +"Time bucketing. \"raw\" = every reported value (often hourly at source). \"hourly\"/\"daily\" = server-side rollups with a statistical summary per bucket; an hour is labeled by the time it ends, and a day is the station's local calendar day. Use \"daily\" for multi-month trends to keep the series small; \"raw\" for fine-grained recent analysis."
    • changedInput schema / properties / datetimeFrom / description
      Previous value: -"Start of the range, inclusive. Date \"YYYY-MM-DD\" (opens at 00:00:00Z that day) or full UTC \"YYYY-MM-DDTHH:MM:SSZ\". Omit to get the most recent values."New value: +"Start of the range, inclusive. A date \"YYYY-MM-DD\" opens at local midnight of that day in the station's timezone (UTC midnight when OpenAQ lists none); a full UTC \"YYYY-MM-DDTHH:MM:SSZ\" is sent as is. Omit to start from the sensor's earliest data — the series runs oldest first, so on a long-running station an open start fills the row cap with its oldest values; set datetimeFrom to reach recent ones. effectiveRange echoes the instant sent."
    • changedInput schema / properties / datetimeTo / description
      Previous value: -"End of the range, inclusive. Date \"YYYY-MM-DD\" covers that whole day (closes at 23:59:59Z) or full UTC \"YYYY-MM-DDTHH:MM:SSZ\". Must land after datetimeFrom — the two forms mix freely, so \"2026-06-25\" to \"2026-06-25\" is a valid one-day range. Omit for \"up to now\"."New value: +"End of the range, inclusive. A date \"YYYY-MM-DD\" covers that whole station-local day, closing at the next local midnight, so a DST day spans 23 or 25 hours; a full UTC \"YYYY-MM-DDTHH:MM:SSZ\" is sent as is. Must land after datetimeFrom — the two forms mix freely, so \"2026-06-25\" to \"2026-06-25\" is a valid one-day range. Omit for \"up to now\". effectiveRange echoes the instant sent."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "location",
      -      "parameter",
      -      "sensorId",
      -      "aggregation",
      -      "series",
      -      "rowCount",
      -      "pulledCount",
      -      "pullComplete",
      -      "totalCount"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "location",
      +      "parameter",
      +      "sensorId",
      +      "aggregation",
      +      "series",
      +      "rowCount",
      +      "pulledCount",
      +      "pullComplete",
      +      "totalCount",
      +      "effectiveRange"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / effectiveRange
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "The range sent to OpenAQ as UTC instants — date-only bounds expanded to the station's local day.",
      +  "properties": {
      +    "datetimeFrom": {
      +      "description": "Lower bound sent to OpenAQ, UTC. Null when datetimeFrom was omitted.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "datetimeTo": {
      +      "description": "Upper bound sent to OpenAQ, UTC. Null when datetimeTo was omitted.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "datetimeFrom",
      +    "datetimeTo"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `location_not_found`: The locationId does not exist. `parameter_not_at_location`: No sensor at the station measures parametersId (often the wrong unit variant was chosen). `no_data_for_range`: The sensor has no measurements in the requested date range. `invalid_date_range`: The range is empty — once both bounds are expanded to full UTC timestamps, datetimeTo does not land after datetimeFrom. `canvas_not_found`: The supplied canvas_id is unknown or has expired, so the series cannot be staged onto it. `upstream_error`: OpenAQ returned 5xx or an unreadable body on every retry. `rate_limited`: OpenAQ returned 429 — the request budget for this key is exhausted. `upstream_timeout`: OpenAQ did not respond within the request timeout on every retry. `invalid_api_key`: OpenAQ returned 401 — the configured OPENAQ_API_KEY is missing, invalid, or revoked. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `location_not_found`: The locationId does not exist. `parameter_not_at_location`: No sensor at the station measures parametersId (often the wrong unit variant was chosen). `no_data_for_range`: The sensor has no measurements in the requested date range. `invalid_date_range`: The range is empty — once date-only bounds are expanded to the station's local day, datetimeTo does not land after datetimeFrom. `canvas_not_found`: The supplied canvas_id is unknown or has expired, so the series cannot be staged onto it. `upstream_error`: OpenAQ returned 5xx or an unreadable body on every retry. `rate_limited`: OpenAQ returned 429 — the request budget for this key is exhausted. `upstream_timeout`: OpenAQ did not respond within the request timeout on every retry. `invalid_api_key`: OpenAQ returned 401 — the configured OPENAQ_API_KEY is missing, invalid, or revoked. Other values are possible when a failure originates below the handler."
    • addedOutput schema / properties / gapCount
      Added value: +{
      +  "description": "Missing intervals inside an hourly or daily series — a span between buckets that do not touch, or a bucket with a null value, merged where contiguous — counted over every pulled row, not only the preview. 0 when nothing is missing; absent for raw, whose rows follow no fixed cadence.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / gaps
      Added value: +{
      +  "description": "The first 20 missing intervals, oldest first. Omitted when gapCount is 0.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One missing interval",
      +    "properties": {
      +      "datetimeFrom": {
      +        "description": "Start of the missing interval, UTC",
      +        "type": "string"
      +      },
      +      "datetimeTo": {
      +        "description": "End of the missing interval, UTC",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "datetimeFrom",
      +      "datetimeTo"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / location / properties / provider
      Added value: +{
      +  "description": "Network that operates the station — cite it alongside OpenAQ. Null when OpenAQ lists none.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / location / properties / providerId
      Added value: +{
      +  "description": "Provider id, usable as providersId in openaq_find_locations. Null when OpenAQ lists none.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / location / properties / timezone
      Added value: +{
      +  "description": "IANA timezone of the station (e.g. \"America/Los_Angeles\"). Daily buckets and date-only bounds follow its calendar days. Null when OpenAQ lists none.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / location / required
      Previous value: -[
      -  "id",
      -  "name"
      -]New value: +[
      +  "id",
      +  "name",
      +  "provider",
      +  "providerId",
      +  "timezone"
      +]
    • changedOutput schema / properties / notice / description
      Previous value: -"What limited this response or where the rest of it lives — the row cap, a failed page, DataCanvas being unavailable, or the canvas table the series was staged on and the tools that read it."New value: +"What limited this response or where the rest of it lives — the row cap, a failed page, a station with no timezone, an edge bucket clipped by the range, missing intervals, DataCanvas being unavailable, or the canvas table the series was staged on and the tools that read it."
    • changedOutput schema / properties / pullComplete / description
      Previous value: -"True when the pager reached the end of the requested range, so pulledCount is the whole series for it. False when the 5000-row cap or a failed page stopped the pull early — the rows past that point are in neither this response nor the canvas table, and the notice says how to reach them."New value: +"True when pulledCount is the whole series for the requested range. False when the 5000-row cap or a failed page stopped the pull early — the rows past that point are in neither this response nor the canvas table, and the notice says how to reach them."
    • changedOutput schema / properties / pulledCount / description
      Previous value: -"Rows pulled from OpenAQ — the canvas table's row count when canvasId is present. Equals rowCount when the whole series fit inline; larger when series is a preview."New value: +"Rows pulled from OpenAQ, at most 5000 — the canvas table's row count when canvasId is present. Equals rowCount when the whole series fit inline; larger when series is a preview."
    • changedOutput schema / properties / series / description
      Previous value: -"The (possibly previewed) series, newest or oldest first per the API. Every row here is also rendered in the text output. When truncated, this is a preview of pulledCount rows — query canvasId for the rest."New value: +"The (possibly previewed) series in the order OpenAQ returns it (oldest first). An hourly/daily series either skips a missing bucket or returns it with a null value — gapCount and gaps report both. Every row here is also rendered in the text output. When truncated, this is a preview of pulledCount rows — query canvasId for the rest."
    • changedOutput schema / properties / series / items / properties / percentComplete / description
      Previous value: -"Coverage of the bucket (0–100); low values flag gappy data"New value: +"Coverage of the bucket as OpenAQ reports it — observed readings as a percentage of expected ones. Low values flag gappy data. Usually 0–100, but it exceeds 100 when a bucket holds more readings than expected, e.g. 200 on the hour a DST fall-back repeats"
  2. Changed4 schema fields changed
    • addedInput schema / properties / locationId / exclusiveMinimum
      Added value: +0
    • removedInput schema / properties / locationId / minimum
      Removed value: --9007199254740991
    • addedInput schema / properties / parametersId / exclusiveMinimum
      Added value: +0
    • removedInput schema / properties / parametersId / minimum
      Removed value: --9007199254740991
  3. Changed12 schema fields changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"DataCanvas id from a prior openaq_get_measurements call, to reuse the same canvas (e.g. to compare two stations' series side by side). Omit to start fresh; the response returns a new canvas_id when the series spills."New value: +"DataCanvas id from a prior openaq_get_measurements call, to put this series on the same canvas (e.g. to compare two stations' series side by side). Supplying it stages the series whatever its size. Reuse stages one table per sensor, so a second sensor adds a table while the same sensor overwrites its earlier series — the response says so when that happens. Omit to start fresh; the response returns a new canvas_id when the series overflows the inline preview."
    • changedInput schema / properties / limit / description
      Previous value: -"Max rows per page from the API (1–1000). Default 1000. The tool pages internally up to the spill threshold."New value: +"Max rows per page from the API (1–1000). Default 1000. The tool pages internally up to the 5000-row pull ceiling."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "location",
      -      "parameter",
      -      "sensorId",
      -      "aggregation",
      -      "series",
      -      "rowCount",
      -      "totalCount"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "location",
      +      "parameter",
      +      "sensorId",
      +      "aggregation",
      +      "series",
      +      "rowCount",
      +      "pulledCount",
      +      "pullComplete",
      +      "totalCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • changedOutput schema / properties / canvasId / description
      Previous value: -"DataCanvas id holding the pulled series. Query with openaq_dataframe_query. The pull stops at 5000 rows, so this is the whole series only when totalCount is at or below that — read the notice, which says so when the cap or a failed page cut the pull short."New value: +"DataCanvas id holding the staged series — pulledCount rows of it. Call openaq_dataframe_describe on this id for the table's columns, then openaq_dataframe_query to run SQL. Present whenever staging succeeded, which includes a series that fit inline on a canvas_id you supplied."
    • changedOutput schema / properties / notice / description
      Previous value: -"What limited this response, when something did — the row cap, a failed page, or DataCanvas being unavailable — plus how to reach the rest."New value: +"What limited this response or where the rest of it lives — the row cap, a failed page, DataCanvas being unavailable, or the canvas table the series was staged on and the tools that read it."
    • addedOutput schema / properties / pullComplete
      Added value: +{
      +  "description": "True when the pager reached the end of the requested range, so pulledCount is the whole series for it. False when the 5000-row cap or a failed page stopped the pull early — the rows past that point are in neither this response nor the canvas table, and the notice says how to reach them.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / pulledCount
      Added value: +{
      +  "description": "Rows pulled from OpenAQ — the canvas table's row count when canvasId is present. Equals rowCount when the whole series fit inline; larger when series is a preview.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / series / description
      Previous value: -"The (possibly previewed) series, newest or oldest first per the API. When truncated, this is a preview — query canvasId for the rows staged there."New value: +"The (possibly previewed) series, newest or oldest first per the API. Every row here is also rendered in the text output. When truncated, this is a preview of pulledCount rows — query canvasId for the rest."
    • changedOutput schema / properties / tableName / description
      Previous value: -"Canvas table name for the staged series (e.g. \"measurements_1701\"). Reference it in SQL."New value: +"Canvas table holding the staged series (e.g. \"measurements_1701\"). openaq_dataframe_describe lists its columns; reference this name in openaq_dataframe_query SQL. One table per sensor, so re-staging the same sensor on this canvas overwrites it."
    • changedOutput schema / properties / totalCount / description
      Previous value: -"Total rows in the full series."New value: +"Rows in the full series for this range. A floor rather than an exact count when totalCountIsLowerBound is set; never below pulledCount."
    • addedOutput schema / properties / totalCountIsLowerBound
      Added value: +{
      +  "description": "Set when totalCount is only a floor: the pull stopped early and OpenAQ reported the range total as \">N\" instead of an exact number, so more rows exist than totalCount states. Absent when the count is exact.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when the series exceeded the inline limit, so series is a preview and the pulled rows were staged on canvasId. Absent/false when everything fit inline. It says nothing about whether the pull itself was complete — compare rowCount and totalCount, and read the notice."New value: +"True when the series exceeded the inline limit, so series is a preview of the pulled rows. Absent/false when every pulled row is inline. It describes the preview only — canvasId reports whether the rows were staged, and pullComplete whether the pull itself finished."
  4. Changed9 schema fields changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"DataCanvas id from a prior call to reuse the same canvas (e.g. to compare two stations' series side by side). Omit to start fresh; the response returns a new canvas_id when the series spills."New value: +"DataCanvas id from a prior openaq_get_measurements call, to reuse the same canvas (e.g. to compare two stations' series side by side). Omit to start fresh; the response returns a new canvas_id when the series spills."
    • addedInput schema / properties / canvas_id / pattern
      Added value: +"^[A-Za-z0-9_-]{10}$"
    • removedOutput schema / properties / parameter / properties / displayName / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / parameter / properties / displayName / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / series / items / properties / percentComplete / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / series / items / properties / percentComplete / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / series / items / properties / summary / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "avg": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Mean reading in the bucket"
      -      },
      -      "max": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Maximum reading in the bucket"
      -      },
      -      "median": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Median reading in the bucket"
      -      },
      -      "min": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Minimum reading in the bucket"
      -      },
      -      "sd": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Standard deviation — null when only one reading in the bucket"
      -      }
      -    },
      -    "required": [
      -      "min",
      -      "median",
      -      "max",
      -      "avg",
      -      "sd"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "avg": {
      +        "description": "Mean reading in the bucket",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "max": {
      +        "description": "Maximum reading in the bucket",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "median": {
      +        "description": "Median reading in the bucket",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "min": {
      +        "description": "Minimum reading in the bucket",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "sd": {
      +        "description": "Standard deviation — null when only one reading in the bucket",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "min",
      +      "median",
      +      "max",
      +      "avg",
      +      "sd"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / series / items / properties / value / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / series / items / properties / value / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  5. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "location",
      +      "parameter",
      +      "sensorId",
      +      "aggregation",
      +      "series",
      +      "rowCount",
      +      "totalCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `location_not_found`: The locationId does not exist. `parameter_not_at_location`: No sensor at the station measures parametersId (often the wrong unit variant was chosen). `no_data_for_range`: The sensor has no measurements in the requested date range. `invalid_date_range`: The range is empty — once both bounds are expanded to full UTC timestamps, datetimeTo does not land after datetimeFrom. `canvas_not_found`: The supplied canvas_id is unknown or has expired, so the series cannot be staged onto it. `upstream_error`: OpenAQ returned 5xx or an unreadable body on every retry. `rate_limited`: OpenAQ returned 429 — the request budget for this key is exhausted. `upstream_timeout`: OpenAQ did not respond within the request timeout on every retry. `invalid_api_key`: OpenAQ returned 401 — the configured OPENAQ_API_KEY is missing, invalid, or revoked. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "location_not_found",
      +            "parameter_not_at_location",
      +            "no_data_for_range",
      +            "invalid_date_range",
      +            "canvas_not_found",
      +            "upstream_error",
      +            "rate_limited",
      +            "upstream_timeout",
      +            "invalid_api_key"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "location",
      -  "parameter",
      -  "sensorId",
      -  "aggregation",
      -  "series",
      -  "rowCount",
      -  "totalCount"
      -]
  6. Changed11 schema fields changed
    • changedInput schema / properties / datetimeFrom / description
      Previous value: -"Start of the range, inclusive. Date \"YYYY-MM-DD\" or full UTC \"YYYY-MM-DDTHH:MM:SSZ\". Omit to get the most recent values."New value: +"Start of the range, inclusive. Date \"YYYY-MM-DD\" (opens at 00:00:00Z that day) or full UTC \"YYYY-MM-DDTHH:MM:SSZ\". Omit to get the most recent values."
    • changedInput schema / properties / datetimeTo / description
      Previous value: -"End of the range, inclusive. Must be on or after datetimeFrom. Omit for \"up to now\"."New value: +"End of the range, inclusive. Date \"YYYY-MM-DD\" covers that whole day (closes at 23:59:59Z) or full UTC \"YYYY-MM-DDTHH:MM:SSZ\". Must land after datetimeFrom — the two forms mix freely, so \"2026-06-25\" to \"2026-06-25\" is a valid one-day range. Omit for \"up to now\"."
    • changedOutput schema / properties / canvasId / description
      Previous value: -"DataCanvas id holding the full series. Query with openaq_dataframe_query."New value: +"DataCanvas id holding the pulled series. Query with openaq_dataframe_query. The pull stops at 5000 rows, so this is the whole series only when totalCount is at or below that — read the notice, which says so when the cap or a failed page cut the pull short."
    • changedOutput schema / properties / notice / description
      Previous value: -"Degraded-mode hint when the series was truncated but DataCanvas is unavailable."New value: +"What limited this response, when something did — the row cap, a failed page, or DataCanvas being unavailable — plus how to reach the rest."
    • changedOutput schema / properties / series / description
      Previous value: -"The (possibly previewed) series, newest or oldest first per the API. When truncated, this is a preview — query canvasId for the full set."New value: +"The (possibly previewed) series, newest or oldest first per the API. When truncated, this is a preview — query canvasId for the rows staged there."
    • changedOutput schema / properties / series / items / properties / summary / description
      Previous value: -"Per-bucket statistics — present for hourly/daily, null for raw"New value: +"Per-bucket statistics — present for hourly/daily, null for raw. Every field is null in a gap bucket"
    • addedOutput schema / properties / series / items / properties / value / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / series / items / properties / value / description
      Previous value: -"Value for the bucket (the measurement for raw; the bucket aggregate for hourly/daily)"New value: +"Value for the bucket (the measurement for raw; the bucket aggregate for hourly/daily). Null for a gap bucket the sensor reported nothing into — the bucket is kept so the series stays evenly spaced on the time axis"
    • removedOutput schema / properties / series / items / properties / value / type
      Removed value: -"number"
    • changedOutput schema / properties / tableName / description
      Previous value: -"Canvas table name for the full series (e.g. \"measurements_1701\"). Reference it in SQL."New value: +"Canvas table name for the staged series (e.g. \"measurements_1701\"). Reference it in SQL."
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when the series exceeded the inline limit and the full set was staged on canvasId. Absent/false when everything fit inline."New value: +"True when the series exceeded the inline limit, so series is a preview and the pulled rows were staged on canvasId. Absent/false when everything fit inline. It says nothing about whether the pull itself was complete — compare rowCount and totalCount, and read the notice."
  7. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, openWorldHint, idempotentHint), the description discloses crucial behavior: date-only bounds map to local calendar days, DST variation, unit handling (never converts), aggregation summaries, overwriting behavior on canvas reuse, and the staging threshold with a preview + canvasId. This is far richer than what annotations provide and sets clear expectations.

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 long but every sentence carries critical information. It is well-structured: purpose first, then usage, then parameter semantics, then staging behavior. The length is justified by the tool's complexity; it could be slightly tightened but remains efficient.

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 tool with 7 parameters, detailed date handling, staging, and a documented output schema, the description covers all essentials: how to specify ranges, what the response contains (preview, canvasId, table), downstream tools to use, and unit behavior. Nothing an agent needs to call it correctly is missing.

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?

Even though schema coverage is 100%, the description adds substantial meaning: it explains date range interpretation (inclusive, local midnight, DST), aggregation semantics (bucket labeling, summary stats), canvas_id behavior (staging, overwrite), and how locationId/parametersId are obtained (from find_locations/list_parameters). This goes well beyond the schema's 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 states a specific verb ('get') and resource ('measurements series') with clear scope: one pollutant, one station, over a date range. It immediately names the use case (trend analysis) and distinguishes itself from sibling tools like openaq_dataframe_describe/query and openaq_get_readings by focusing on station-level series.

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?

The description gives explicit guidance on when to use this tool (trend analysis, comparing weeks), how to choose aggregation ('daily' for multi-month trends, 'raw' for fine-grained), and how to handle large ranges (staging on DataCanvas with openaq_dataframe_describe/query). It also explains the canvas_id reuse pattern for side-by-side comparisons, covering both usage and alternatives implicitly.

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.