Skip to main content
Glama

Configure MQTT

myio_mqtt_set
DestructiveIdempotent

Configure MQTT client settings on a myIO controller—broker, credentials, topics, QoS, TLS, publishing, subscriptions, and sensor bindings—then persist and reconnect or refresh Home Assistant discovery.

Instructions

Change the MQTT client. Only the given fields change; on/off fields are desired values (sent only when different). save=true (default) persists and reconnects (MqttSave). Fields: enabled, host, port, user, password, client_id, base_topic, retain, qos 0|1, ha_discovery, economy (4.x), tls (4.x), publish_on_change {buttons, outputs, activators}, periodic {outputs, temperatures, humidity, usens (4.x), sdm} + period_s 5..65000, subscribe, command_channel, command_slot; sensor_binding {slot, topic, key, usens} (4.5+; usens 0 = unbind); rediscover=true refreshes the Home Assistant entities without reconnecting. Editor/admin level.

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": "myio_mqtt_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
qosNo
tlsNo
hostNo
portNo
saveNo
userNo
retainNo
serverNocontroller name (default Ground floor)
economyNo
enabledNo
passwordNo
period_sNo
periodicNo
client_idNo
subscribeNo
base_topicNo
rediscoverNo
command_slotNo
ha_discoveryNo
sensor_bindingNo
command_channelNo
publish_on_changeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag destructive=true and idempotent=true; the description goes beyond them by explaining PATCH semantics ('Only the given fields change'), that on/off fields are desired values sent only when different, that save reconnects the client, and that rediscover avoids reconnection. It stops short of warning that a bad host/topic can sever the device connection, which is the key risk for a destructive MQTT mutation.

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-loads the two behaviors that matter (partial update, save/rediscover) before the field dump, and the field list is compactly semicolon-delimited with no filler. It is dense to the point of being a run-on, but with 22 parameters nearly every token earns its place.

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?

For a 22-parameter nested-object mutation with no output schema, the description covers update semantics, defaults, side effects, version applicability and access level. Remaining gaps are the meaning of individual flags (ha_discovery, economy, subscribe, command_channel) and any return/error behavior.

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 description coverage is only 5% across 22 parameters, so the description must carry the load and it does: it enumerates nearly every field (enabled, host, port, user, password, client_id, base_topic, retain, qos 0|1, ha_discovery, economy, tls, publish_on_change, periodic, period_s, subscribe, command_channel, command_slot, sensor_binding, rediscover), gives the period_s 5..65000 range, marks version gates (4.x, 4.5+) and explains 'usens 0 = unbind' for sensor_binding. Only 'server' is unmentioned, and that is the single parameter the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Change the MQTT client') and immediately scopes it as a partial update. It is distinguishable from the read-side sibling myio_mqtt, though it never names that sibling or explicitly says 'use myio_mqtt to read the current config'.

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 a real decision rule: use rediscover=true to refresh Home Assistant entities without reconnecting, versus save=true (the default) to persist and reconnect, and it states the editor/admin access requirement. What's missing is guidance on when not to call it at all (e.g. validating config before applying), which would push this to a 5.

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