Skip to main content
Glama

Search areas

search_areas
Read-onlyIdempotent

Find Home Assistant areas by fuzzy-matching a name fragment and return ranked matches with IDs, floor, icon, and score. Use it when you know an area's name but not its exact ID.

Instructions

Fuzzy-rank areas by name.

Scores every area from the area registry against query, keeps only scores above 0, and returns the top limit matches sorted descending.

Use when: you don't know an area's exact id and want a ranked guess from a name fragment. Not for: an exact, unranked area list — use areas_list_areas. Returns: list of dicts (area_id, name, floor_id, icon, score) up to limit entries. Limits: areas that score exactly 0 are dropped entirely; a WS failure yields an empty list rather than an error.

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": {
      "query": "<query>"
    },
    "name": "search_areas"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of ranked results to return; defaults to 20.
queryYesSearch text to fuzzy-match against area names.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds behavior those annotations cannot express: zero-score areas are silently dropped, results are capped and sorted descending, and a workspace failure returns an empty list instead of an error. That failure-mode disclosure is exactly the kind of context that prevents an agent from misreading an empty result as "no areas exist."

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?

Labeled blocks (Use when / Not for / Returns / Limits) make it skimmable and the core behavior is front-loaded in the first line. The "Returns" line partially duplicates the existing output schema, which is the only wasted text.

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 two-parameter search tool with full schema and annotation coverage, this covers everything an agent needs: selection criteria, ranking semantics, result cap, and the empty-list-on-failure caveat. Nothing material 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?

Schema coverage is 100%, so both parameters are already documented, but the description adds meaning: `query` is matched as a name fragment (fuzzy) rather than an exact string, and `limit` governs the ranked top-N cut. It stops short of stating scoring specifics or tie-breaking, so it is above baseline but not fully additive.

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 specific verb+resource: "Fuzzy-rank areas by name," and the following sentence describes the exact mechanism (score every area, keep >0, return top `limit` sorted descending). This is clearly distinguishable from `areas_list_areas`, which the description names as the unranked alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Contains an explicit "Use when" clause (unknown id, want a ranked guess from a name fragment) and an explicit "Not for" clause routing exact unranked listing to `areas_list_areas`. No inference is required to pick between the two.

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