Skip to main content
Glama
Aqara Local MCP

Aqara Local MCP

by marc3k18

aqara_set_value

Writes a raw value to an Aqara device trait over the LAN through a hub. Requires operator-enabled writes and user confirmation before execution.

Instructions

Write one value to a device through the hub, over the LAN.

device: name or DID. trait: path (e.g. 2.132.32920), trait code (OnOff) or name. value: the raw value as a string ("1" on, "0" off, a number, or an enum code). Refused unless the operator enabled writes. Ask the user before calling this.

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": "<device>",
      "trait": "<trait>",
      "value": "<value>"
    },
    "name": "aqara_set_value"
  }
}

Input Schema

NameRequiredDescriptionDefault
traitYes
valueYes
deviceYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does real work: it discloses the LAN/hub transport, that writes are gated by an operator setting, and that refusal is the failure mode. It does not discuss idempotency, error surface beyond refusal, or side effects on other traits, so it is strong but not exhaustive.

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 action and transport are front-loaded in one sentence, followed by a per-parameter block with consistent 'name: meaning' structure, closing with the safety gate. No filler and nothing repeated from 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 3-required-param mutation tool with no annotations, the definition covers the safety gate, transport, and all parameter formats, and an output schema exists so return values need no explanation. The remaining gap is minor: what a refusal or partial failure looks like in practice, and whether the write is idempotent.

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?

Schema coverage is 0%, so the description must compensate and does: device accepts name or DID, trait accepts a path (with a concrete example 2.132.32920), a trait code (OnOff), or a name, and value is explicitly the raw string form with '1'/'0'/number/enum-code examples. Every parameter's accepted format is explained beyond the bare schema types.

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?

Names a specific verb and scope: 'Write one value to a device through the hub, over the LAN.' The write semantics immediately separate it from the read-oriented siblings (get_device, list_devices, status, recent_events) without needing to name them.

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?

Gives clear preconditions rather than alternatives: 'Refused unless the operator enabled writes' and 'Ask the user before calling this.' An agent knows the gate and the confirmation requirement. It stops short of naming an explicit alternative path for read-only inspection, which the siblings cover implicitly.

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