Skip to main content
Glama

Create or update a runtime entity group

automations_set_group

Create or update a runtime group.* entity and manage its members, name, or icon; changes are temporary and vanish on restart or YAML reload.

Instructions

Create or update an old-style group.* entity at runtime.

Calls the group.set service with object_id=group_id and whichever of name/entities/icon/all/add_entities/remove_entities were given. The group is NOT written to groups.yaml and disappears on restart or automations_reload_groups-style YAML reload; for a persistent group use a Group helper or add it to groups.yaml with the files_write_config_file tools. Does not create light/switch/cover group helpers.

Not for: a group that survives a restart — define it in groups.yaml instead (files_write_config_file) or create a Group helper. Returns: dict {"status": "set", "group_id": "group.<id>"}. Errors: returns {"error": "entities cannot be combined with add_entities/remove_entities — pass a full member list via entities, or incremental changes via add_entities/remove_entities, not both"} when entities is given together with add_entities or remove_entities; group.set is not called in that case. Limits: entities replaces the whole member list and must not be combined with add_entities/remove_entities in the same call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iconNoMDI icon string, e.g. 'mdi:lightbulb-group'. Omit to leave it unset/unchanged.
nameNoFriendly name for the group. Omit to leave it unset/unchanged.
entitiesNoFull list of entity_ids to set as the group's members, replacing the current member list. Omit to leave members unchanged (use add_entities/remove_entities instead).
group_idYesBare group id (e.g. 'living_room_lights') — no 'group.' prefix.
add_entitiesNoEntity_ids to add to the existing member list. Do not combine with `entities`.
all_entitiesNoIf True, the group's state is 'on' only when every member is on. False (default) does not clear an existing all:true.
remove_entitiesNoEntity_ids to remove from the existing member list. Do not combine with `entities`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.25.1
    • changedInput schema / properties / add_entities / description
      Previous value: -"Add these entity_ids to existing members."New value: +"Entity_ids to add to the existing member list. Do not combine with `entities`."
    • changedInput schema / properties / all_entities / description
      Previous value: -"If True, group state = ON only when ALL members are on."New value: +"If True, the group's state is 'on' only when every member is on. False (default) does not clear an existing all:true."
    • changedInput schema / properties / entities / description
      Previous value: -"Full list of entity_ids to include (replaces current members)."New value: +"Full list of entity_ids to set as the group's members, replacing the current member list. Omit to leave members unchanged (use add_entities/remove_entities instead)."
    • changedInput schema / properties / icon / description
      Previous value: -"MDI icon string (e.g. 'mdi:lightbulb-group')."New value: +"MDI icon string, e.g. 'mdi:lightbulb-group'. Omit to leave it unset/unchanged."
    • changedInput schema / properties / name / description
      Previous value: -"Friendly name (optional)."New value: +"Friendly name for the group. Omit to leave it unset/unchanged."
    • changedInput schema / properties / remove_entities / description
      Previous value: -"Remove these entity_ids from existing members."New value: +"Entity_ids to remove from the existing member list. Do not combine with `entities`."
  2. Addedv0.18.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), but the description adds real context beyond them: the group is not written to groups.yaml, it disappears on restart or YAML reload, it forwards to group.set, and it returns a specific error payload without calling the service when entities is combined with add/remove. The one gap is that replacing the entire member list via `entities` sits awkwardly beside destructiveHint=false, though the replacement semantics are at least disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and sectioned, but repetitive: the persistence caveat and the files_write_config_file alternative appear twice, and the entities/add_entities/remove_entities exclusion is stated three times (service-call paragraph, Errors, Limits). Trimming the duplication would lose no information.

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?

For a 7-parameter mutation tool with an output schema already present, the description covers the essentials an agent needs: mutation semantics, persistence lifecycle, valid parameter combinations, error behavior, and the correct alternative for persistent groups. Nothing material is missing.

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, but the description adds value by enumerating exactly which fields are forwarded to group.set and by spelling out the failure contract for the entities vs add_entities/remove_entities conflict. Minor wrinkle: it refers to the `all` parameter while the schema names it `all_entities`, which could momentarily confuse mapping.

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+resource ('Create or update an old-style group.* entity at runtime') and immediately draws the boundary against adjacent capabilities, explicitly noting it does not create light/switch/cover group helpers. Combined with the sibling set (automations_list_groups, automations_remove_group, helpers_*), an agent can place this tool precisely without opening the schema.

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?

Gives an explicit when-to-use (runtime group that need not survive restart) and when-not ('Not for: a group that survives a restart'), naming the concrete alternatives — groups.yaml via files_write_config_file or a Group helper. It also states the mutually exclusive parameter combinations, so the agent knows how to shape a valid call.

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