Skip to main content
Glama

Get filtered HA snapshot

snapshot_get_snapshot
Read-onlyIdempotent

Fetch Home Assistant states, registries, and config in one filtered call to avoid multiple round-trips. Apply domain, area, and pagination filters to assemble context quickly.

Instructions

Return a single filtered snapshot combining HA states, registries and config.

Reads live states via ha.get_states() and, depending on include, the area/floor/device/entity registries and config entries over HTTP in one call, applies domains/area_id filtering and limit/offset pagination to the states list, and returns one dict keyed by section name. Every call in this path is a read; nothing here writes to HA.

Use when: a client needs several registries and/or states together and should not spend several round-trips assembling that context. Not for: a single registry without filtering — use entities_list_entities or ws_get_states for a plain state list, or areas_list_devices/ devices_list_devices for a plain device list. Returns: dict keyed by requested section (states, areas, floors, devices, entities, integrations, config), plus _meta (echoed filters and per-section counts) and _states_total (pre-pagination count) when states is included. Errors: {"error": "unknown_include", "unknown": [...], "valid": [...]} when include names a section outside the valid set. Limits: limit/offset paginate only the states section; every other section is always returned in full.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of states to return after filtering, for pagination on large setups. Omit for no limit.
offsetNoNumber of filtered states to skip before applying limit, for pagination. 0 starts from the first matching state.
area_idNoArea registry ID; keeps only states/devices/entities assigned to this area, directly or via their device. Omit for no area filter.
domainsNoEntity domain filter applied to the states/entities sections, e.g. ['light', 'climate']. Omit to include every domain.
includeNoSections to return. Omit for the default states/areas/devices/entities/integrations set. Valid values: states, areas, floors, devices, entities, integrations, config.
summaryNoIf true, each state is reduced to entity_id/state/friendly_name. Set false for full attributes; ignored when state_fields is given.
state_fieldsNoExplicit per-state keys to return, overriding summary. Valid: entity_id, state, friendly_name, attributes, last_changed, last_updated. Omit to use summary instead.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.25.1
    • addedInput schema / properties / area_id / description
      Added value: +"Area registry ID; keeps only states/devices/entities assigned to this area, directly or via their device. Omit for no area filter."
    • addedInput schema / properties / domains / description
      Added value: +"Entity domain filter applied to the states/entities sections, e.g. ['light', 'climate']. Omit to include every domain."
    • addedInput schema / properties / include / description
      Added value: +"Sections to return. Omit for the default states/areas/devices/entities/integrations set. Valid values: states, areas, floors, devices, entities, integrations, config."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of states to return after filtering, for pagination on large setups. Omit for no limit."
    • addedInput schema / properties / offset / description
      Added value: +"Number of filtered states to skip before applying limit, for pagination. 0 starts from the first matching state."
    • addedInput schema / properties / state_fields / description
      Added value: +"Explicit per-state keys to return, overriding summary. Valid: entity_id, state, friendly_name, attributes, last_changed, last_updated. Omit to use summary instead."
    • addedInput schema / properties / summary / description
      Added value: +"If true, each state is reduced to entity_id/state/friendly_name. Set false for full attributes; ignored when state_fields is given."
  2. Addedv0.18.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds material context beyond them: reads go over HTTP via ha.get_states(), 'nothing here writes to HA', the exact error shape for an invalid include value, and the important constraint that limit/offset paginate only the states section. This is a strong complement to the structured safety hints.

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 opening sentence, then clearly labelled Use when / Not for / Returns / Errors / Limits blocks. Despite covering a rich behaviour surface, every sentence carries actionable information with no redundancy.

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?

Despite an output schema existing and seven parameters, the description supplies the error contract, the pagination scoping rule, the section-keyed return shape, and _meta/_states_total semantics. An agent has everything needed to invoke and interpret this tool correctly.

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 the baseline is 3; the description still adds value by clarifying that filtering applies to states/entities, that include defaults to the states/areas/devices/entities/integrations set, and that pagination affects only the states section while other sections are returned in full. The schema already documents most parameter behaviour, so it stops short of a 5.

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 concrete verb and resource ('Return a single filtered snapshot combining HA states, registries and config') and enumerates exactly which sections are merged. It also explicitly names the sibling tools it is not (entities_list_entities, ws_get_states, areas_list_devices, devices_list_devices), so an agent can discriminate it from neighbours without opening a 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?

Provides an explicit 'Use when' condition (a client needs several registries and/or states together and should avoid multiple round-trips) and a 'Not for' exclusion that routes each rejected case to a specific alternative tool. Both when-to-use and when-not-to-use are covered with named alternatives.

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