Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

by rilhia

Find what uses an item

find_related
Read-onlyIdempotent

Find which automations, scripts, scenes, groups, devices, and areas reference an entity, device, area, floor, label, automation, script, or scene before renaming, disabling, or deleting it.

Instructions

Impact analysis. Shows which automations, scripts, scenes, groups, devices and areas reference an entity, device, area, floor, label, automation, script or scene (search/related). Use before renaming, disabling or deleting.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "item_type": "<item_type>",
      "item_id": "<item_id>"
    },
    "name": "find_related"
  }
}

Input Schema

NameRequiredDescriptionDefault
item_idYesThe id: entity_id, device id, area_id, automation entity id and so on.
item_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is fully covered without prose. The description adds that results span multiple reference domains (the "(search/related)" API note is a useful implementation hint), but says nothing about whether indirect/transitive references are included or how results are grouped, which matters for impact analysis.

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?

Three short clauses with the purpose front-loaded, the scope next, and the trigger last. No filler and no repetition of the title or annotations.

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?

With only two required parameters and no output schema, the definition covers what an agent needs to select and invoke it. The one remaining gap is that the shape of the returned reference list is left implicit rather than stated.

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 50%: item_id is documented in the schema, while item_type relies on its enum. The description names the accepted item types, which compensates somewhat, but its list omits enum values present in the schema (group, config_entry, integration, person), so it neither fully matches nor extends the 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?

Opens with a one-word framing ("Impact analysis") then states a precise verb+resource: which automations, scripts, scenes, groups, devices and areas reference a given item. The concept of reverse-reference lookup is clearly distinct from forward-lookup siblings such as search_entities or list_registry.

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 before renaming, disabling or deleting" gives a concrete trigger condition that maps directly to the agent's decision to call it. It stops short of naming an alternative or an explicit when-not-to-use case, so it is strong but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.