ambience-mcp

v0.2.1
ambience-mcp Checked 2 days ago Published 28 days ago

Local MCP server for authoring Home Assistant Ambience scenes

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ambience_get_context

Live Ambience authoring context: areas/floors, an entity SUMMARY (counts by domain/area/device_class), exposed actions and their field schemas, and category/period/lux definitions. Fetch this before authoring so every id and vocabulary word is real. It carries entity COUNTS, not entity rows — a real house has thousands. Use ambience_find_entities to look up the actual entities you need, the summary to discover what exists, ambience_get_scope for a scope's scenes, and ambience_list_traces for traces.

ambience_find_entities

Look up entities in the live catalog. This is how you get entity ids — ambience_get_context carries only COUNTS, because a real house has thousands of entities. Filters combine with AND; each of domain/area_id/device_class takes one value or a list. `query` is a case-insensitive substring of the entity_id or name. Results are paged: pass the returned `cursor` back to get the next page (`cursor` is null on the last page). `limit` defaults to 50, max 200. Everything is reachable here — an action can target any domain you expose, and a `state`/`template` cond…

ParameterTypeDescription
area_id
cursor
device_class
domain
limit
query

ambience_get_scope

Read the current scenes for one scope. scope = {"kind": "area"|"floor"|"house", "id": "<area_or_floor_id>"} (omit id for house). Each scene carries a per-category `rank` (1..N, evaluation order); present that plus the 📌 pin marker, never the raw internal `priority` number.

ParameterTypeDescription
scope *object

ambience_get_guide

Fetch the Ambience scene-authoring guide (schema + cookbook) live from the running install. Read it before authoring. The guide is far too large to return at once, so it is served by section. Call with no argument to get the list of section names, then call again with section=<name> to read one. Start with "Config schema" and "Condition cookbook"; read "Reading a diagnostic bundle" when diagnosing why a scene did not fire. A large section is returned in parts: pass part=<n> and follow the response `notice` to fetch the rest.

ParameterTypeDescription
part
section

ambience_dry_run

Preview which scene currently wins for a scope, without executing its actions — no evaluation trace, just the winning scene. Read-only. scope shape as in ambience_get_scope. Presence detail (who is home, occupancy, down-device names) and this result's own action params (lock PINs, alarm codes) are redacted before reaching you — but you can still read stored action params via ambience_get_scope, which you need in order to preserve them on a wholesale save. An older Ambience that cannot redact returns this result unredacted, with a `notice` saying so.

ParameterTypeDescription
scope *object

ambience_validate

Structurally validate a proposed list of scenes (raises on invalid).

ParameterTypeDescription
scenes *array

ambience_preview_write

Preview a full scope write WITHOUT committing. Returns validity, a before/after diff (added/updated/removed), any unknown_categories, the categories it will create (creating_categories), the existing categories it will overwrite (updating_categories, before/after), and a confirm_token. Declare any new category a scene uses in new_categories ([{id, name, icon?, color?}]); they are created on apply. If unknown_categories is non-empty the write is blocked (no usable token) — declare them here or create them with ambience_save_categories. Show the diff to the user; pa…

ParameterTypeDescription
scenes *array
scope *object
new_categories

ambience_apply_write

Commit a full scope write. Requires the confirm_token from a prior ambience_preview_write of this EXACT scope+scenes+new_categories. Any new_categories are created before the scenes are saved. Reversible via Ambience undo. Only call after the user has approved the previewed diff. THIS REPLACES THE WHOLE SCOPE. `scenes` must be the scope's COMPLETE scene list — any existing scene you leave out is DELETED, including scenes in categories you did not mean to touch. Unlike a pasted import block there is no merge mode. So: ambience_get_scope first, carry forward every…

ParameterTypeDescription
confirm_token *string
scenes *array
scope *object
new_categories

ambience_list_traces

Recent scene-evaluation traces for diagnosis ("why didn't my scene fire?"). If the list is too big for one result, the oldest traces are dropped and the result carries `omitted` and a `notice` saying so — ask again with a smaller `limit` to see a different slice.

ParameterTypeDescription
limit

ambience_list_categories

List the scene categories (id + name + icon/color).

ambience_save_categories

Create/update scene categories. Each item = {id, name, icon?, color?}.

ParameterTypeDescription
categories *array