Skip to main content
Glama

get_device_history

Retrieve hourly readings for a specific air quality sensor over a chosen number of days, with min, max, and average summaries for trend analysis.

Instructions

Hourly records for a specific sensor over N days. Returns records plus min/max/avg summary.

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": {
      "code": "<code>"
    },
    "name": "get_device_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesDevice code identifier
daysNoNumber of days back

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose the output contents (hourly records plus min/max/avg summary), which is valuable given there is no output schema, but it omits behavior for an unknown device code, whether this requires any permission, and rate/latency characteristics.

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?

Two sentences, zero filler, with the data granularity and range front-loaded and the return shape second. Nothing repeats the schema.

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 simple two-parameter read tool with no output schema, the description covers what the tool returns and at what granularity, which is the main gap it needed to fill. Only edge-case behavior (invalid code, empty history) is left unstated.

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%, so the schema already documents both 'code' and 'days' with bounds and defaults. The description's 'specific sensor over N days' only restates them without adding syntax, format, or edge-case meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb-and-resource combo: hourly sensor records over N days, with min/max/avg summary. It is clearly a historical/read tool, which implicitly distinguishes it from get_device_current, but it never names a sibling or explicitly sets scope against get_historical_trend.

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

Usage Guidelines3/5

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

Usage is only implied by the phrase 'over N days' plus the schema's 1-30 day bound; there is no explicit statement of when to pick this over get_device_current or get_historical_trend, and no exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.