Skip to main content
Glama

z2m_rename_device

Rename a Zigbee2MQTT device's friendly name, updating its MQTT topic. Optionally also rename the Home Assistant entity to keep automations and dashboards working.

Instructions

Rename a device's friendly_name. Renaming changes its MQTT topic, so anything referencing the old name (automations, dashboards, scripts) breaks until updated — this is reversible only by renaming back. Set homeassistant_rename to also rename the Home Assistant entity. Use z2m_set_device_options for behaviour changes that do not affect the topic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYesDevice friendly_name or ieee_address.
new_nameYesNew friendly_name. '/' creates folder structure in MQTT.
homeassistant_renameNoAlso update the Home Assistant entity ID. Default false.
Behavior5/5

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

Discloses that renaming changes the MQTT topic, breaks automations/dashboards/scripts until updated, and is reversible only by renaming back. This adds significant context beyond the readOnlyHint=false annotation, which only signals a write operation without specifying side effects.

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 sentences: purpose, side effects/reversibility, and alternative tool. Every sentence earns its place with no repetition of annotations or fluff.

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 mutation tool with no output schema, the description covers the action, consequences, reversibility, and parameter behavior. Combined with comprehensive schema and annotations, the agent has enough information to invoke it correctly without ambiguity.

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% (device, new_name, homeassistant_rename all documented). The description reinforces the folder-structure behavior already in the schema and adds MQTT-topic impact context, but it does not provide new parameter-level detail beyond 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?

Description opens with 'Rename a device's friendly_name' – a specific verb and resource. It clearly distinguishes itself from z2m_set_device_options by noting that this tool affects the MQTT topic, while the alternative handles behavior changes.

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?

Explicitly states 'Use z2m_set_device_options for behaviour changes that do not affect the topic,' giving a direct alternative and exclusion. Also warns about breaking references, helping the agent decide when renaming is appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alexpfau/zigbee2mqtt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server