Skip to main content
Glama

Create or overwrite a scene config

automations_set_scene_config
DestructiveIdempotent

Create or overwrite a Home Assistant scene's stored config with entity target states, then reload scenes so changes take effect. Use it to edit scene definitions, not to activate them.

Instructions

Create or overwrite a scene's stored config, then reload scenes.

Posts {id, name, entities} to /api/config/scene/config/<id>, replacing any existing config at that id, then calls the scene.reload service so the change takes effect immediately.

Not for: applying the scene's states right now — use automations_activate_scene. Returns: dict {"scene_id", "name", "entity_count", ...} merged with HA's save response. Errors: returns {"error": "entities must be a non-empty dict of {entity_id: state_dict}"} when entities is empty or not a dict. Limits: no confirm parameter; an existing scene at scene_id is replaced without a prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFriendly name shown for the scene in the UI.
entitiesYesNon-empty mapping of entity_id to its target state dict for this scene, e.g. {'light.living_room': {'state': 'on', 'brightness': 76}}. Brightness is 0-255 (30% ~ 76, 50% ~ 128, 100% = 255).
scene_idYesScene id to create or overwrite, bare (e.g. 'movie_night') or prefixed ('scene.movie_night').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.25.1
    • addedInput schema / properties / entities / description
      Added value: +"Non-empty mapping of entity_id to its target state dict for this scene, e.g. {'light.living_room': {'state': 'on', 'brightness': 76}}. Brightness is 0-255 (30% ~ 76, 50% ~ 128, 100% = 255)."
    • addedInput schema / properties / name / description
      Added value: +"Friendly name shown for the scene in the UI."
    • addedInput schema / properties / scene_id / description
      Added value: +"Scene id to create or overwrite, bare (e.g. 'movie_night') or prefixed ('scene.movie_night')."
  2. Addedv0.18.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint/idempotentHint/readOnlyHint=false, but the description adds genuinely new behavior: the side-effecting call to `scene.reload`, the silent overwrite with no `confirm` prompt, the exact error shape on invalid `entities`, and the merged return payload. This is well beyond what the structured fields convey and is consistent with them.

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?

Front-loaded with the core action, then organized into labeled Not for/Returns/Errors/Limits sections that are easy to scan. It is longer than minimal and the second sentence restates the first at a lower level, but no section is filler.

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 destructive, idempotent write tool with nested-object parameters, the description covers the side effect, the no-confirmation risk, the error contract, and the response shape. An output schema exists, so the Returns section is a bonus rather than a necessity, and nothing an agent needs 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 description coverage is 100%, so baseline is 3. The description nonetheless adds the validation contract for `entities` ('non-empty dict of {entity_id: state_dict}') and the overwrite behavior tied to `scene_id`, giving meaning slightly beyond the schema text.

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+scope ('Create or overwrite a scene's stored config') and immediately distinguishes itself from the sibling that applies scenes. An agent can separate this from automations_activate_scene, automations_get_scene_config, and automations_delete_scene without opening any 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?

Explicit 'Not for: applying the scene's states right now — use automations_activate_scene' gives a named alternative and the condition that selects it. The overwrite semantics (existing config at id replaced without prompt) further define when this tool is the right 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