Skip to main content
Glama

mqtt_publish

Send a message to an MQTT topic to transmit test data or trigger actions on the broker.

Instructions

Publish a message to an MQTT topic. Useful for sending test data or triggering actions on the broker.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qosNoQuality of Service level (0, 1, or 2). Default is 0.
topicYesThe MQTT topic to publish to (e.g., 'agents/test/status')
retainNoWhether to set the retain flag on the message. Default is false.
messageYesThe message payload to publish

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and largely fails it: it says nothing about delivery guarantees, connection/broker prerequisites, error behavior on failure, or whether the call blocks. The only behavioral hints (QoS, retain) live in the schema, not the description.

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?

Two short sentences, the action front-loaded and the rationale second. No redundancy, no filler, immediately scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter publish tool with no annotations and no output schema, the description is minimally sufficient on the 'what' but silent on operational context an agent would want (required connection state, failure modes, whether a response is returned).

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%, so topic, message, qos, and retain are already fully documented with types, defaults, and an example. The description adds no semantic detail beyond the schema, which is the baseline expectation.

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?

States a specific verb and resource ('Publish a message to an MQTT topic'), which is unmistakably distinct from the subscribe/read/list siblings. It does not, however, explicitly name or contrast itself with any sibling tool.

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

Usage Guidelines3/5

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

The second sentence gives a use context ('sending test data or triggering actions on the broker'), which implies when the tool is appropriate. There is no explicit when-not guidance or reference to alternatives such as mqtt_subscribe for consuming messages.

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