Skip to main content
Glama

PitCanary

Get one PitCanary's history

get_device_history
Read-onlyIdempotent

Returns measurements over time for a single sensor rather than a room. Takes the same window and metric filter as the room history, and is the one to use when a device changed rooms during the period. 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": {
      "device_id": "<device_id>",
      "from": "<from>",
      "to": "<to>",
      "metrics": "<metrics>"
    },
    "name": "get_device_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesLast day, YYYY-MM-DD. At most 31 days after from.
fromYesFirst day, YYYY-MM-DD.
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.
device_idYesThe PitCanary id, as returned by list_devices, or active_device_id in list_rooms.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the description's added value is the account requirement and the warning that a device may have moved rooms mid-period, which affects how results should be interpreted. It says nothing about return shape, ordering, or how measurements are bucketed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Three short sentences, each earning its place: scope, usage rule, and prerequisite. The discriminating constraint (single sensor, room changes) is front-loaded.

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-only time-series query with a fully documented schema, the description covers the essential decision points and prerequisites. Without an output schema, a brief note on the returned series shape or pagination behavior would have closed the remaining gap.

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%, including the exact metric enum meanings and the 31-day window constraint, so the schema carries the parameter burden. The description only adds the analogy that the window and metric filter behave like the room history call, which is useful orientation but not new semantics.

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 measurements over time for a single sensor") and immediately scopes it against the room-level equivalent ("rather than a room"), so an agent can separate it from get_history 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 Guidelines4/5

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

It gives a concrete selection rule: use this one "when a device changed rooms during the period," and notes it shares the window/metric filter with the room history, which implies the parent alternative. It stops short of naming get_history explicitly or saying when not to use it, but the context is clear.

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