Skip to main content
Glama

device.set

Control a Home Assistant device by turning it on, off, toggling it, or setting its brightness level from 0 to 255.

Instructions

Turn a device on/off/toggle or set brightness level.

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": {
      "entity_id": "<entity_id>",
      "action": "<action>"
    },
    "name": "device.set"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueNoBrightness 0-255 when action=level.
actionYes
entity_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it says nothing about permission or auth requirements, what happens if the device is unreachable, whether brightness is preserved across on/off, or what the call returns. For a state-mutating tool this is a significant omission.

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?

A single front-loaded sentence with no filler, and the action enumeration comes early. It is efficient, though the terseness borders on under-specification rather than polish.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter mutation tool with no annotations and no output schema, the definition leaves out entity_id sourcing, error/failure behavior, and result shape. The brightness range only survives because the schema happens to state it.

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 only 33% — only the value parameter is documented — but the description compensates partially by tying 'level' to brightness and listing the valid action words. It adds nothing for entity_id, leaving the agent without guidance on identifier format or where to obtain valid IDs.

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 names a concrete verb+resource pair ('Turn a device') and enumerates the four supported actions (on/off/toggle/brightness), which map directly to the action enum. It is easy to separate from read-oriented siblings like device.list and device.state, though it never explicitly contrasts itself with ha.call_service.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no prerequisites, and no mention of the overlapping sibling ha.call_service, which an agent might otherwise pick for the same job. Usage is only inferable from the verb itself.

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