Skip to main content
Glama

Set device state

set_device_state

Change a smart-home device's state, such as locking a door or adjusting a thermostat, by specifying the device and the fields to modify.

Instructions

Changes a device's state, such as locking a door or setting a thermostat. Needs the device and the fields to change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYesFields to change, merged into the current state: lock {locked}, thermostat {mode, target_c}, light {on, brightness}, plug {on}.
deviceYesThe device's name or id.
memberNoWho is asking, if known: a member id or name. Used for per-member policies and the audit trail.
dry_runNoWhen true, return the preview only. Nothing is written and nothing is queued.
idempotency_keyNoOptional client-chosen key. Repeating a call with the same key returns the original outcome instead of acting twice.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The description accurately reflects the readOnlyHint=false annotation by indicating a state-changing operation. It adds a little context with examples of state changes but does not disclose additional behavioral traits such as audit trail logging, idempotency behavior, or dry-run semantics. These are documented in the schema, and annotations already indicate it is not read-only, so the description is adequate but not rich.

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?

The description is two short sentences, front-loading the main action and providing examples. The second sentence is slightly redundant with the schema's required fields, but it is not wasteful. Overall it is compact and easy to parse.

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?

Given the presence of an output schema, 100% parameter coverage, and explicit annotations, the description does not need to explain return values or every field. It provides enough operational context for an agent to understand the tool's core purpose. It could be improved by mentioning the merge semantics or side effects, but the schema already handles most of that.

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 description coverage is 100%, so the schema fully documents all five parameters. The description adds minimal parameter-level meaning beyond noting that 'the device' and 'the fields to change' are needed, which is a minor reinforcement of the required parameters. This matches the baseline of 3 for high schema coverage.

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?

The description clearly states the verb 'changes' and the resource 'a device's state', with concrete examples such as locking a door or setting a thermostat. This distinguishes it from read-only siblings like list_devices and unrelated siblings like add_chore. It could be a 5 if it explicitly named an alternative tool, but the purpose is still specific and understandable.

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?

The phrase 'Needs the device and the fields to change' communicates the minimum required inputs, implying this tool is used when you want to modify a device's state. However, it does not provide explicit when-to-use/when-not-to-use guidance or name alternative tools, so the usage context is only implied, not spelled out.

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