Skip to main content
Glama

Get an ESPHome device's HA entities

esphome_get_device_entities
Read-onlyIdempotent

Retrieve every Home Assistant entity exposed by one ESPHome device and view their current states. Use it to inspect a specific device's entities when you know its name.

Instructions

Get every HA entity belonging to one ESPHome device.

Slugifies device_name (lowercase, spaces/dashes to underscores) and, if a device-registry entry's own slugified name matches, matches entities by that device's device_id (precise: immune to one device's slug being a substring of another's). Falls back to matching entity registry entries whose platform is "esphome" and whose entity_id contains the slug when no device-registry entry matches (or that lookup fails).

Use when: inspecting a specific device's exposed entities and their current state. Not for: the device list itself — use esphome_list_devices. Returns: list of {"entity_id", "name", "domain", "state", "attributes", "disabled"} dicts. Errors: [{"error": str(e)}] when reading the entity registry or states raises.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_nameYesDevice name as used in HA, e.g. 'Kitchen Sensor' or 'kitchen_sensor' (matched case-insensitively against a slugified form).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / device_name / description
      Added value: +"Device name as used in HA, e.g. 'Kitchen Sensor' or 'kitchen_sensor' (matched case-insensitively against a slugified form)."
  2. Addedv0.18.1

TDQS

A4.5/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 further by disclosing the slugification and device-registry matching strategy, the substring-fallback behavior, and the error return shape — substantive traits beyond the structured hints.

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?

Well front-loaded: purpose first, then matching mechanics, then Use/Not-for/Returns/Errors blocks. It is on the longer side, and the Returns line is partly redundant with the output schema, but each section carries distinct information and nothing is wasted.

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 one-parameter tool with an output schema, the description covers purpose, selection guidance, matching semantics, and error behavior — more than enough to invoke correctly. Slight over-explanation of return values is the only redundancy.

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 coverage is 100% and the schema documents case-insensitive slug matching, so baseline is 3. The description adds the actual slugify rule (lowercase, spaces/dashes to underscores) and the precise-vs-fallback matching consequences, giving real meaning beyond the parameter schema.

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 (get) and resource (HA entities belonging to one ESPHome device), and explicitly distinguishes itself from the sibling esphome_list_devices. An agent can tell exactly what it returns without opening the 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 explicit 'Use when' (inspecting a specific device's exposed entities and current state) and 'Not for' (the device list itself — use esphome_list_devices) sections, naming the alternative directly. Nothing 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