Skip to main content
Glama
TheWhykiki

hass-mcp

by TheWhykiki

ha_list_entity_registry

List all entity registry entries from Home Assistant to view configured entities and their unique identifiers.

Instructions

List Home Assistant entity registry entries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler for 'ha_list_entity_registry'. It calls ha.listEntityRegistry() and returns the JSON result.
    server.tool(
      'ha_list_entity_registry',
      'List Home Assistant entity registry entries.',
      ListEntityRegistryInput.shape,
      async () => {
        const entities = await ha.listEntityRegistry()
        return {
          content: [{ type: 'text', text: JSON.stringify(entities, null, 2) }],
        }
      },
    )
  • The listEntityRegistry() method on HomeAssistantClient that makes a WebSocket call to 'config/entity_registry/list'.
    async listEntityRegistry(): Promise<EntityRegistryEntry[]> {
      return await this.wsCall('config/entity_registry/list')
    }
  • The wsCall private helper that sends a WebSocket message (used by listEntityRegistry).
    private async wsCall<T>(type: string, payload: Record<string, unknown> = {}): Promise<T> {
      const connection: any = await this.ensureConnected()
      if (typeof connection.sendMessagePromise !== 'function')
        throw new Error('Home Assistant connection does not support sendMessagePromise')
    
      return await connection.sendMessagePromise({ type, ...payload }) as T
    }
  • The Zod schema definition for ListEntityRegistryInput (empty object, no parameters).
    export const ListEntityRegistryInput = z.object({}).strict()
  • src/index.ts:121-131 (registration)
    The tool is registered via server.tool() with name 'ha_list_entity_registry'.
    server.tool(
      'ha_list_entity_registry',
      'List Home Assistant entity registry entries.',
      ListEntityRegistryInput.shape,
      async () => {
        const entities = await ha.listEntityRegistry()
        return {
          content: [{ type: 'text', text: JSON.stringify(entities, null, 2) }],
        }
      },
    )

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.7

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It implies a read-only listing operation but adds no details about return structure, filtering, pagination, or entity registry specifics. It is minimally transparent, fitting a simple list tool.

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, focused sentence that clearly states the tool's purpose with no redundant words or fluff.

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 zero-parameter list tool with no output schema, the description is adequately complete. It clearly defines the resource being listed, though it could optionally mention that it returns all entity registry entries, but this is implied by 'List' and the absence of filters.

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 input schema has zero parameters, so the baseline is 4. The description adds no parameter info, but none is needed since there are no parameters to explain.

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 a specific resource ('Home Assistant entity registry entries'), clearly distinguishing it from sibling tools like ha_list_states, ha_list_areas, and ha_list_devices that target different Home Assistant entities.

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?

No guidance is provided on when to use this tool versus alternatives. The description simply states what it does, without mentioning context, exclusions, or that other list tools exist for different resource types.

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