Skip to main content
Glama

Find possibly unused entities

search_find_unused_entities
Read-onlyIdempotent

Identify unused or orphaned Home Assistant entities for cleanup by flagging those unavailable, unknown, or missing a device_id for over 7 days.

Instructions

Heuristically list entities that look unused or orphaned.

Flags entities whose state has been 'unavailable' or 'unknown' for more than 7 days (or has no last_changed at all), plus any entity-registry entries with no device_id — which normally means helpers, automations and template entities, not proof of disuse.

Use when: hunting for cleanup candidates, always reviewing each result before deleting anything. Returns: list of dicts (entity_id, state, last_changed, device_id, reasons) — reasons explains which heuristic(s) matched. Limits: purely heuristic; the 7-day unavailability threshold and a missing device_id are weak signals, not confirmation that an entity is truly unused.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the exact heuristics (unavailable/unknown >7 days, missing last_changed, missing device_id), warning that these are weak signals, and describing the returned 'reasons' field. This gives the agent behavioral insight that readOnly/idempotent hints alone do not provide.

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-structured and front-loaded, using clear Use/Returns/Limits sections. It is slightly verbose, with the heuristic nature repeated in both the opening and the Limits section, but every part still 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?

Complete for a heuristic, read-only, zero-parameter tool: it explains what is flagged, why it is only a signal, and what the output contains. Annotations and output schema cover safety and return shape, so no critical context 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 has zero parameters, so parameter semantics are not applicable. Per the baseline for 0-parameter tools, a 4 is appropriate because there are no parameter meanings to clarify.

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 ('list') and resource ('entities that look unused or orphaned'), and clearly scopes the result as heuristic cleanup candidates. It differentiates itself from ordinary entity search by explaining the exact heuristic criteria used.

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?

Explicitly says 'Use when: hunting for cleanup candidates' and adds a strong caution to review each result before deleting. It provides clear context but does not name alternative tools or describe when not to use this tool.

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