Skip to main content
Glama

Bulk turn on, off or toggle entities

entities_bulk_control

Turn on, turn off, or toggle multiple Home Assistant entities across domains in one call, grouping IDs by domain to send one service call per domain.

Instructions

Turn on, turn off or toggle many entities in one call, grouped by domain.

Groups entity_ids by domain and issues one <domain>.<action> service call per domain group (e.g. all light.* entities get a single light.turn_on), instead of one call per entity.

Use when: applying the same on/off/toggle action to many entities across domains at once. Not for: writing arbitrary states instead of calling a service — use entities_bulk_set_state; controlling every entity of one domain in a single area by area_id rather than an explicit entity_id list — use areas_control_area. Returns: dict mapping domain to the number of entities affected. Errors: raises ValueError when action is not one of turn_on, turn_off, toggle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesService to call per domain group: 'turn_on', 'turn_off' or 'toggle'.
entity_idsYesFull entity IDs to act on, e.g. ['light.a', 'light.b'].

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.1
    • addedInput schema / properties / action / description
      Added value: +"Service to call per domain group: 'turn_on', 'turn_off' or 'toggle'."
    • addedInput schema / properties / entity_ids / description
      Added value: +"Full entity IDs to act on, e.g. ['light.a', 'light.b']."
  2. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare safety hints, but the description adds valuable behavioral mechanics: grouping by domain, one service call per domain group, the return shape (dict mapping domain to affected count), and the exact ValueError condition. This goes well beyond what annotations provide.

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?

Front-loaded with the core action, then mechanics, usage guidance, returns, and errors. Every sentence earns its place; no wasted wording.

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 two fully documented parameters, an output schema, and non-destructive annotations, the description is complete. It even covers return values and error conditions, leaving no ambiguity for correct invocation.

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?

Schema coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining that entity_ids are grouped by domain and that action determines the service call issued per group, which clarifies how the parameters interact.

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?

States a specific verb (turn on/off/toggle), resource (many entities), and scope (bulk, grouped by domain). It clearly distinguishes itself from single-entity siblings like entities_turn_on and from non-service state writing tools.

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

Usage Guidelines5/5

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

Explicitly provides a 'Use when' condition and two 'Not for' alternatives with named sibling tools (entities_bulk_set_state and areas_control_area). The agent can select correctly without inference.

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

Deploy Server

Other Tools