Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Set Zone

ha_set_zone
Destructive

Create or update a Home Assistant zone by setting its name, coordinates, radius, icon, and passive mode, or modify an existing zone with its ID.

Instructions

Create or update a Home Assistant zone.

Omit zone_id to create a new zone (name, latitude, longitude required). Provide zone_id to update an existing zone (only specified fields change). The 'home' zone is typically defined in YAML and cannot be modified here.

EXAMPLES:

  • Create: ha_set_zone(name="Office", latitude=40.7128, longitude=-74.0060, radius=150, icon="mdi:briefcase")

  • Update: ha_set_zone(zone_id="abc123", radius=200)

If a Claude Desktop user gets a 4-minute timeout with no result on this call, read the target back before repeating it, and tell them to wait a few seconds before clicking the manual-approve button, as clicking it too quickly is known to cause hangs in Claude Desktop. This workaround is specific to Claude Desktop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iconNoMaterial Design Icon (e.g., 'mdi:briefcase', 'mdi:school')
nameNoDisplay name for the zone
radiusNoRadius of the zone in meters (must be > 0, defaults to 100 on create)
passiveNoPassive mode - if True, zone will not trigger enter/exit automations (defaults to False on create)
zone_idNoZone ID to update (use ha_get_zone to find IDs)
latitudeNoLatitude coordinate of the zone center
longitudeNoLongitude coordinate of the zone center

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv8.6.0
    • changedInput schema / properties / latitude / description
      Previous value: -"Latitude coordinate of the zone center (required for create)"New value: +"Latitude coordinate of the zone center"
    • changedInput schema / properties / longitude / description
      Previous value: -"Longitude coordinate of the zone center (required for create)"New value: +"Longitude coordinate of the zone center"
    • changedInput schema / properties / name / description
      Previous value: -"Display name for the zone (required for create)"New value: +"Display name for the zone"
    • changedInput schema / properties / zone_id / description
      Previous value: -"Zone ID to update (omit to create new zone, use ha_get_zone to find IDs)"New value: +"Zone ID to update (use ha_get_zone to find IDs)"
  2. First observedv7.14.2

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag this as a destructive, non-idempotent write, and the description adds real operational context beyond them: partial-update semantics ('only specified fields change'), create-vs-update field requirements, the immutability of the 'home' zone, and a concrete Claude Desktop 4-minute timeout/hang workaround. That last item is the kind of environment-specific behavior an agent could not infer from annotations.

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?

Front-loaded with purpose, then mode rules, then two compact examples, then the environment workaround. Every paragraph earns its place, though the Claude Desktop caveat paragraph is long relative to the core instruction and could be tightened.

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?

Covers both modes, create-time requirements, defaults (radius/passive documented in schema), and the special-case zone. An output schema exists, so return values need no explanation. Missing only failure behavior (e.g., duplicate name, invalid coordinates), which is a modest gap for a create-or-update tool.

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 description coverage is 100%, so the baseline is 3, but the description adds meaning the schema cannot express: the schema declares ZERO required parameters, while the description tells the agent that name, latitude and longitude are required on create. It also pairs the update path with concrete example payloads (radius=200) showing partial updates are legal.

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 pair and resource ('Create or update a Home Assistant zone') and immediately clarifies the two operating modes. It also names the sibling it is not ('The home zone ... cannot be modified here'), letting an agent distinguish it from ha_get_zone/ha_remove_zone without opening a schema.

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?

Gives clear conditional routing: omit zone_id to create (with which fields become required), supply zone_id to update with partial-field semantics. It also states an exclusion (the 'home' zone is YAML-defined). It stops short of naming the concrete alternatives (ha_get_zone for lookup, ha_remove_zone for deletion) in the description body itself.

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