Skip to main content
Glama

Search entities

search_search_entities
Read-onlyIdempotent

Fuzzy-search Home Assistant entities by matching a query against entity ID, friendly name, or device ID, returning ranked results with scores.

Instructions

Fuzzy-rank entities by entity_id, friendly_name and device_id.

Scores every entity against query with substring match (score 1.0) or a sequence-similarity ratio, keeps only scores above 0, and returns the top limit matches sorted descending.

Use when: you don't know the exact entity_id and want a ranked guess from a name fragment. Returns: list of dicts (entity_id, friendly_name, state, device_id, score) up to limit entries. Limits: entities that score exactly 0 are dropped entirely, not just deprioritised.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of ranked results to return; defaults to 20.
queryYesSearch text to fuzzy-match against entity_id, friendly_name and device_id.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.1
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of ranked results to return; defaults to 20."
    • addedInput schema / properties / query / description
      Added value: +"Search text to fuzzy-match against entity_id, friendly_name and device_id."
  2. First observedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already carry the safety profile (readOnly, idempotent, non-destructive), so the description earns credit for adding non-obvious behavior: the substring-vs-sequence-similarity scoring, descending sort, and the fact that zero-score entities are dropped entirely rather than deprioritised. It omits any performance/rate context but the core behavioral traits are disclosed.

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?

Front-loaded with the purpose, then cleanly partitioned into Use when / Returns / Limits blocks. Every sentence adds usable information with no 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?

Usage condition, result shape, ordering, and the zero-score drop are all covered. An output schema exists so return values need not be restated, yet the description completes the picture for correct invocation.

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%, so the schema already documents both params and baseline would be 3. The description adds genuine meaning: 'query' is matched by substring (1.0) or sequence similarity, and 'limit' selects the top N sorted descending, going beyond the schema's generic wording.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (fuzzy-rank) and resource (entities), and spells out the fields matched (entity_id, friendly_name, device_id). It does not explicitly differentiate from nearby siblings like search_search_devices or entities_list_entities, so it stops short of a 5.

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?

The 'Use when: you don't know the exact entity_id and want a ranked guess from a name fragment' clause gives a clear selection condition, implicitly contrasting with exact-lookup tools like entities_get_entity. It does not name a specific alternative tool, so it is not a full 5.

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