Skip to main content
Glama

PitCanary

Get measurement history

get_history
Read-onlyIdempotent

Returns the measurements themselves over a window, as buckets of averages with a minimum and a maximum, and a guides block saying what each metric is called, what unit it is in and where this room's good band sits. Everything a chart needs travels with it, so draw it: a question about how something moved over time is answered better by a picture with the good band marked than by a list of numbers, and the reader can see at a glance whether the line sat inside it. Use get_trends instead when the question is why rather than what. Requires a PitCanary account.

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": {
      "room_id": "<room_id>",
      "from": "<from>",
      "to": "<to>",
      "metrics": "<metrics>"
    },
    "name": "get_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesLast day of the window, YYYY-MM-DD, inclusive. Days times metrics may be at most 50 (31 days of one metric, 25 of two, 16 of three, 12 of four); a longer window would be too large to read.
fromYesFirst day of the window, YYYY-MM-DD, inclusive.
metricsYesOne to four of: temp (°C), hum (% relative humidity), co2 (ppm), voc (VOC index, 100 is the room's own baseline), nox (NOx index), dba (sound, dBA), lux (light), uv (raw sensor output, not a UV index), daylight (share of the light that is daylight, %), cct (colour temperature, K), blue_light (blue share of the spectrum, %), flicker (%), occ (how busy the room was, %, never a headcount), pressure (hPa), vibration (mg), comfort (room score). The names are the keys each bucket carries.
room_idYesThe room id, as returned by list_rooms.

Output Schema

NameRequiredDescriptionDefault
toNo
fromNo
moreNo
guidesYesHow to draw each metric present: its label, its unit, how many decimals it deserves, and this room's own good band. A metric whose band the owner switched off has no good range, and must not be drawn with one.
bucketsYesOne entry per interval, oldest first. Each carries the bucket's start, how many readings it folds, and per metric an avg with a min and a max. Plot avg as the line and min to max as a band around it.
room_idNo
resolutionNotenmin, hour or day, chosen from the window asked for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, idempotentHint, destructiveHint=false, closed-world), so the description spends its budget on things annotations cannot convey: the aggregation semantics (averages with min/max), the presence of a guides block with metric names, units and good bands, and the account requirement. It does not mention rate limits or how the 50 day-times-metric cap is enforced beyond the schema's own note.

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 the output shape, then the usage rule, then the auth prerequisite — a sensible order. The instruction to draw rather than list is genuinely useful, but the rationale about the reader seeing the line inside the band at a glance is persuasive padding that could be trimmed without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read tool with an output schema present, the description gives more than enough: what the payload contains, what the guides block is for, when to prefer the sibling, and the account prerequisite. The remaining gap is minor — nothing is said about how sparse or empty windows behave.

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

Parameters3/5

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

Schema coverage is 100% and the schema itself is unusually rich, enumerating every metric with its unit and the window-size constraint. The description adds only the indirect note that metric names are the keys each bucket carries, which is a small increment over structured data. Baseline 3 applies.

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 and resource ('returns the measurements themselves over a window') and immediately characterizes the shape of what comes back: buckets of averages with a min and a max, plus a guides block. That distinguishes it from a raw-readings tool and from get_trends without the agent needing to open any 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?

It names an explicit alternative ('Use get_trends instead when the question is why rather than what') and indicates the preferred presentation for time-evolution questions. The what-vs-why split is somewhat impressionistic and the agent must infer the boundary, but the routing signal is present and actionable.

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