Skip to main content
Glama

Find orphan devices

search_find_orphan_devices
Read-onlyIdempotent

Find devices in the entity registry with no linked entities by comparing device IDs against entity references, so you can review orphaned entries for possible removal.

Instructions

List devices with no entities associated with them in the entity registry.

Compares every device's id against the set of device_id values referenced by entity-registry entries and returns devices that no entity points to.

Use when: hunting for device-registry entries that may be safe to remove, always reviewing each result first. Returns: list of dicts (id, name, name_by_user, manufacturer, model, area_id, config_entries) for devices with no referencing entity. Limits: a WS failure on either registry silently yields an empty underlying list rather than an error, which can under-report orphans.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare this a safe, read-only, idempotent operation, so the safety profile is covered. The description goes beyond them with a genuinely useful failure disclosure: a WS failure on either registry silently yields an empty list rather than an error, meaning orphans can be under-reported. It stops short of 5 only because no permission or rate-limit context is added.

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?

The description is front-loaded and clearly segmented with 'Use when', 'Returns', and 'Limits' labels, which makes it easy to scan. It is slightly longer than strictly necessary since the opening sentence and the id-comparison sentence partly overlap, keeping it from a 5.

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?

Despite an output schema existing, the description enumerates the return fields (id, name, name_by_user, manufacturer, model, area_id, config_entries) and discloses the silent-failure caveat, so an agent has everything needed to call and interpret the tool correctly.

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 there is nothing for the description to disambiguate; a baseline of 4 applies. The description correctly adds no fabricated parameter guidance.

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 states a specific verb and resource ('List devices with no entities associated with them in the entity registry') and adds the mechanism (comparing device ids against device_id values referenced by entity-registry entries). This clearly distinguishes it from the nearby sibling search_find_unused_entities, which targets entities rather than devices.

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' clause gives clear context ('hunting for device-registry entries that may be safe to remove') and a caution ('always reviewing each result first'). It does not name alternative tools or state explicit exclusions, so it stops short of a 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