Skip to main content
Glama
TheWhykiki

hass-mcp

by TheWhykiki

ha_list_areas

List all areas registered in Home Assistant to organize and reference your zones.

Instructions

List Home Assistant areas from the area registry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'ha_list_areas' tool handler which calls ha.listAreas() and returns the result as JSON text.
    server.tool(
      'ha_list_areas',
      'List Home Assistant areas from the area registry.',
      ListAreasInput.shape,
      async () => {
        const areas = await ha.listAreas()
        return {
          content: [{ type: 'text', text: JSON.stringify(areas, null, 2) }],
        }
      },
  • Defines the empty input schema for the ha_list_areas tool (no parameters required).
    export const ListAreasInput = z.object({}).strict()
  • src/index.ts:97-106 (registration)
    Registration of the 'ha_list_areas' tool on the MCP server using server.tool().
    server.tool(
      'ha_list_areas',
      'List Home Assistant areas from the area registry.',
      ListAreasInput.shape,
      async () => {
        const areas = await ha.listAreas()
        return {
          content: [{ type: 'text', text: JSON.stringify(areas, null, 2) }],
        }
      },
  • The helper method on HomeAssistantClient that calls the Home Assistant WebSocket API 'config/area_registry/list' to fetch areas.
    async listAreas() {
      return await this.wsCall('config/area_registry/list')
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.7

TDQS

A3.6/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states a listing operation but does not explicitly confirm it is read-only, describe the output, or note any limitations. This is minimal disclosure.

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?

The description is a single concise sentence that is front-loaded with the action and resource. Every word earns its place, with no extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple no-parameter list operation, the description is adequate. It identifies the source (area registry) and the subject (areas). Although there is no output schema, the return type is implicitly a list, so this is sufficiently complete.

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?

The tool has zero parameters, and the schema is an empty object. The baseline for zero parameters is 4, and the description does not need to add parameter-level detail since there are none.

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?

The description uses a specific verb ('List') and identifies the resource ('Home Assistant areas') plus the source ('area registry'), clearly distinguishing it from sibling tools like ha_list_states and ha_list_devices.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention use cases, exclusions, or any comparison with sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.