Skip to main content
Glama

List ESPHome devices

esphome_list_devices
Read-onlyIdempotent

List all ESPHome devices and their online status by matching YAML configs with Home Assistant device-registry entries and entity states.

Instructions

List ESPHome devices from YAML configs, the HA device registry and online status.

Combines <name>.yaml files under /config/esphome/ with matching HA device-registry entries (identified via ESPHome config entries, identifiers domain, or manufacturer as a fallback). A device's connected status comes from its own entities' states (entity registry device_id match): any entity in a state other than "unavailable" means connected, since ESPHome entities share one per-config-entry availability flag (homeassistant/components/esphome/entity.py) — not from a binary_sensor.*_api_connection_status entity, which is not guaranteed to exist.

Use when: getting an overview of every ESPHome device, whether or not it currently has a matching HA device. Not for: one device's entities — use esphome_get_device_entities. Returns: {"yaml_configs": [...], "ha_devices": [...], "online": <int>, "offline": <int>}, where each ha_devices entry's connected is True, False, or None (no known entities/states yet). Errors: ha_devices becomes [{"error": str(e)}] if reading the HA device registry raises; entity-registry/config-entry/state lookups are silently skipped (treated as empty) on error instead of failing the whole call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish read-only/idempotent/non-destructive, and the description adds substantial extra context: how 'connected' is derived (any non-'unavailable' entity state, not a specific binary_sensor), the fallback matching logic, and precise error semantics (registry failure yields an error entry while other lookups are silently skipped). This is rich behavioral disclosure beyond the annotations.

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-loaded with the purpose, then cleanly sectioned into Use when / Not for / Returns / Errors. It is somewhat long and cites internal source files (entity.py) that an agent arguably does not need, but each section earns its place.

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?

Even with an output schema present, the description explains the return shape, the tri-state `connected` value, and error behavior — everything needed to call and interpret the tool correctly. Nothing material is missing.

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 takes zero parameters, so the schema is trivially complete and the baseline of 4 applies. The description correctly adds no parameter discussion because there are none 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?

States a precise verb+resource (list ESPHome devices) and enumerates the three data sources it merges (YAML configs, HA device registry, online status). It also explicitly names the sibling it is not for, so an agent can distinguish it from esphome_get_device_entities without opening either 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?

Uses explicit 'Use when' and 'Not for' framing, including the concrete alternative (`esphome_get_device_entities`) and the condition that selects it. Nothing about when to reach for this tool versus siblings is left to inference.

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