Skip to main content
Glama
jiayunlimailutorontoca

mijia-home-mcp

get_device_statistics

Read-only

Retrieve historical statistics for Xiaomi smart home devices, such as socket power consumption or air purifier usage time. Specify device, metric key, granularity, and number of records.

Instructions

获取设备历史统计数据(如插座耗电量、净化器使用时长)。

并非所有设备都支持统计;键 siid_piid 需从设备说明或 https://home.miot-spec.com 查询(常见如插座功耗为 "7.1")。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo返回最近多少条,默认7。
deviceYes设备名称或 did。
siid_piidYes统计键,格式 "siid.piid",如 "7.1"。
granularityNo统计粒度 hour/day/week/month。day

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint. The description adds behavioral context by stating that device support varies and that the key must be looked up externally, which is valuable beyond annotations.

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?

The description is two sentences, front-loaded with purpose, and contains no extraneous information. Every sentence adds value.

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?

Given the output schema exists and parameters are well-documented, the description covers the essential context: device compatibility, key lookup, and typical use cases. It is complete for an agent to use correctly.

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

Parameters4/5

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

With 100% schema coverage, baseline is 3. The description adds meaning by explaining the siid_piid parameter's format and how to determine it, including an example. This helps agents understand the dynamic value.

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 explicitly states it retrieves historical statistics for devices, with examples like socket power consumption and purifier usage time. It clearly distinguishes from sibling tools like get_device_status and get_device_spec.

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?

The description notes that not all devices support statistics and provides instructions on how to find the correct siid_piid key via device spec or an external link. This gives clear usage context, though alternatives among siblings are not mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jiayunlimailutorontoca/mijia-home-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server