Skip to main content
Glama

Find related entities and registry context

search_find_related
Read-onlyIdempotent

Find an entity's device, area, floor, and related entities on the same device or area before changing or troubleshooting it.

Instructions

Return an entity's device, area, floor and sibling entities.

Looks up entity_id in the entity registry, resolves its device (falling back to the device's area if the entity itself has none) and area/floor, then collects other entities on the same device and other entities/devices in the same area.

Use when: exploring what else is connected to one entity before changing or troubleshooting it. Returns: dict with entity_id, device_id, area_id, floor_id, device, area, same_device_entities, same_area_entities. Errors: {"entity_id": ..., "error": "entity not found in registry"} if the entity isn't in the registry, or {"entity_id": ..., "error": "<message>"} on a WS failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesEntity ID to look up, e.g. 'light.kitchen'; must exist in the entity registry.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / entity_id / description
      Added value: +"Entity ID to look up, e.g. 'light.kitchen'; must exist in the entity registry."
  2. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld=false, and the description adds real value beyond them: the area-inheritance fallback logic and the exact error shapes returned for a missing entity or a WS failure. It doesn't discuss rate limits or pagination, but for a single-entity read that omission is minor.

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 summary followed by labeled 'Use when', 'Returns', and 'Errors' blocks. Every sentence contributes behavior or routing 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?

For a single-param read with an output schema, the definition still documents the return contract and error variants, plus the resolution behavior. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with a single, fully described parameter, so the schema carries the semantics. The description's only added meaning ('must exist in the registry') essentially restates the schema, so baseline 3 applies.

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+resource ('Return an entity's device, area, floor and sibling entities') and spells out the resolution logic (registry lookup, device-to-area fallback, sibling/area collection). This clearly distinguishes it from lookalikes such as entities_get_entity, devices_list_devices_in_area, and areas_get_area_entities.

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?

'Use when: exploring what else is connected to one entity before changing or troubleshooting it' gives a clear usage context. It stops short of naming a specific alternative tool or an explicit when-not condition, so it is strong but not fully routing.

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