Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

List Floors and Areas

ha_list_floors_areas
Read-onlyIdempotent

List floors sorted by level with nested areas, plus unassigned or orphaned areas, to support location-based reasoning and level-scoped operations.

Instructions

List floors sorted by level ascending, each with their assigned areas nested, plus areas without a floor.

Use for location-based reasoning where floor-to-area relationships matter, such as "which rooms are on the ground floor" or operations scoped to a level.

Floors with level=None sort alongside level 0 (ground floor). Areas without a floor assignment appear in unassigned_areas; areas whose floor_id points to a non-existent floor appear in orphaned_areas. When the ha_mcp_tools component's registries capability is available, both registries come from a single in-process snapshot, so this classification is always consistent. Without it (legacy path), the two registries are fetched via independent WebSocket calls and a registry change between reads may transiently misclassify an area.

Input Schema

NameRequiredDescriptionDefault
fieldsNoReturn only the specified top-level response keys to reduce response size (e.g. ["floors"]). None = full response. Available keys: success, floor_count, area_count, unassigned_count, orphaned_count, floors, unassigned_areas, orphaned_areas, message.
area_fieldsNoProject each area record (in floors[].areas, unassigned_areas, and orphaned_areas) to only the specified keys. E.g. ["area_id", "name"] returns slim area records. None = full records. Unknown keys yield empty records. Available keys: area_id, name, icon, floor_id, aliases, picture, labels.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv8.6.0
    • changedInput schema / properties / area_fields / description
      Previous value: -"Project each area record (in floors[].areas, unassigned_areas, and orphaned_areas) to only the specified keys. E.g. [\"area_id\", \"name\"] returns slim area records. None = full records (default). Unknown keys yield empty records. Available keys: area_id, name, icon, floor_id, aliases, picture, labels."New value: +"Project each area record (in floors[].areas, unassigned_areas, and orphaned_areas) to only the specified keys. E.g. [\"area_id\", \"name\"] returns slim area records. None = full records. Unknown keys yield empty records. Available keys: area_id, name, icon, floor_id, aliases, picture, labels."
    • changedInput schema / properties / fields / description
      Previous value: -"Return only the specified top-level response keys to reduce response size (e.g. [\"floors\"]). None = full response (default). Available keys: success, floor_count, area_count, unassigned_count, orphaned_count, floors, unassigned_areas, orphaned_areas, message."New value: +"Return only the specified top-level response keys to reduce response size (e.g. [\"floors\"]). None = full response. Available keys: success, floor_count, area_count, unassigned_count, orphaned_count, floors, unassigned_areas, orphaned_areas, message."
  2. First observedv7.14.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description goes beyond them with genuinely useful behavior: level=None sorting alongside level 0, the unassigned vs orphaned classification rules, and a consistency caveat about the single-snapshot registry path vs the legacy dual-WebSocket path that may transiently misclassify. This is well past the lowered bar.

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-loads the core listing behavior, then usage, then edge-case semantics — a sensible ordering. The final registry-consistency paragraph is dense, but every claim (None-level sort order, orphaned classification, snapshot consistency) carries real invocation-relevant meaning rather than 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?

With an output schema present, the description needn't explain return values, and annotations plus a fully covered input schema handle the rest. The description covers the residual behavioral gaps (sort ordering, classification, consistency) so nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% — both fields and area_fields are fully documented in the schema, including available keys and projection behavior. The description adds nothing about parameters, so the baseline 3 applies.

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 (list) and resource (floors and areas), and describes the exact structure returned: floors sorted by level ascending with nested areas, plus unassigned_areas and orphaned_areas. An agent can distinguish this from the write-oriented siblings (ha_set_area_or_floor, ha_remove_area_or_floor) 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 Guidelines4/5

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

Gives explicit context and worked examples ('which rooms are on the ground floor', level-scoped operations) that tell the agent when this tool is the right choice. It stops short of naming alternative tools or stating when not to use it, so it is clear context without exclusions.

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