Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

Official

Set Zone

ha_set_zone
Destructive

Create a new Home Assistant zone or update an existing one by setting its name, coordinates, radius, icon, or passive mode, so automations and device tracking use accurate location boundaries.

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). Zones defined in YAML, and the home zone, cannot be changed 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="office", radius=200)

  • Update by entity_id: ha_set_zone(zone_id="zone.office", 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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ha_set_zone"
  }
}

Input Schema

NameRequiredDescriptionDefault
iconNoMaterial Design Icon (e.g., 'mdi:briefcase'), stored in the zone as the Home Assistant zone dialog stores it. Home Assistant keeps a zone's stored icon on update: it can be changed but not removed, so '' leaves it. An icon override in the entity registry (ha_get_zone's entity_icon) is set or cleared with ha_set_entity
nameNoDisplay name for the zone
waitNoWait for the zone to be queryable before returning. Set to False for bulk operations.
radiusNoRadius of the zone in meters; Home Assistant uses 100 when it is omitted on create
passiveNoPassive mode: the zone is hidden in the frontend and not used for device tracker state, but automations can still use it (false when omitted on create)
zone_idNoZone ID or entity_id of the zone to update (from ha_get_zone)
latitudeNoLatitude coordinate of the zone center
longitudeNoLongitude coordinate of the zone center

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv9.2.0
    • changedInput schema / properties / icon / description
      Previous value: -"Material Design Icon (e.g., 'mdi:briefcase'). On update, '' clears it, except an icon stored in the zone itself (as the Home Assistant UI stores it; ha_get_zone shows it), which cannot be removed"New value: +"Material Design Icon (e.g., 'mdi:briefcase'), stored in the zone as the Home Assistant zone dialog stores it. Home Assistant keeps a zone's stored icon on update: it can be changed but not removed, so '' leaves it. An icon override in the entity registry (ha_get_zone's entity_icon) is set or cleared with ha_set_entity"
  2. Changed5 schema fields changedv9.0.0
    • changedInput schema / properties / icon / description
      Previous value: -"Material Design Icon (e.g., 'mdi:briefcase', 'mdi:school')"New value: +"Material Design Icon (e.g., 'mdi:briefcase'). On update, '' clears it, except an icon stored in the zone itself (as the Home Assistant UI stores it; ha_get_zone shows it), which cannot be removed"
    • changedInput schema / properties / passive / description
      Previous value: -"Passive mode - if True, zone will not trigger enter/exit automations (defaults to False on create)"New value: +"Passive mode: the zone is hidden in the frontend and not used for device tracker state, but automations can still use it (false when omitted on create)"
    • changedInput schema / properties / radius / description
      Previous value: -"Radius of the zone in meters (must be > 0, defaults to 100 on create)"New value: +"Radius of the zone in meters; Home Assistant uses 100 when it is omitted on create"
    • addedInput schema / properties / wait
      Added value: +{
      +  "default": true,
      +  "description": "Wait for the zone to be queryable before returning. Set to False for bulk operations.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / zone_id / description
      Previous value: -"Zone ID to update (use ha_get_zone to find IDs)"New value: +"Zone ID or entity_id of the zone to update (from ha_get_zone)"
  3. 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)"
  4. First observedv7.14.2

TDQS

A4.7/5.0
Behavior4/5

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

Annotations declare non-readonly, destructive, non-idempotent, so the safety profile is already carried; the description adds real value beyond it by stating partial-update semantics (only specified fields change) and the hard constraint that YAML-defined and home zones cannot be modified here. The Claude Desktop timeout paragraph discloses a known client-side hang and a recovery procedure, which is useful operational context but is long and third-party-specific, keeping it below a 5.

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 the create/update rule and the exclusion, then compact examples. The final Claude Desktop workaround paragraph is the longest single block and is niche client troubleshooting rather than tool semantics, so it dilutes focus slightly, though it is still actionable.

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?

Given eight optional parameters, a 100%-covered schema, an output schema, and destructive annotations, the description supplies the missing pieces: mode selection, required-for-create fields, unsupported targets, concrete invocation examples, and failure-mode recovery. An agent can call this correctly without opening anything else.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description beats that by stating which fields are required for creation (name, latitude, longitude) — information the schema cannot convey since required is empty — and the examples pin down that zone_id accepts either an id or a zone.* entity_id.

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 opening line gives a specific verb pair and resource (create/update a Home Assistant zone) and immediately splits the two modes via the zone_id presence rule. It also names what it explicitly cannot do (YAML-defined zones and the home zone), which is what an agent needs to distinguish this from unrelated config setters.

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?

Clear conditional routing: omit zone_id to create, provide zone_id to update, and only specified fields change. It rules out the two unsupported cases up front and points to ha_get_zone/ha_set_entity for the read and entity-registry-icon paths.

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