Skip to main content
Glama
emqx

AIoT MCP Server

Official
by emqx

publish

Control IoT devices by delivering MQTT messages to their subscribed topics. Discover the correct topic via the discovery tool, then send a command payload to the device.

Instructions

Publish a message to a device using MQTT topic and payload. When asked to control a device, you should use this tool with the topic argument discovered from the "discover" tool. For example, a device might describe itself subscribing to a topic livingroom/456/command, then this is the topic to be used to control the device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qosNo
topicYes
retainNo
payloadYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It explains the core behavior (publish MQTT topic+payload) and the device-control context. However, it does not disclose potential side effects, return values, error conditions, or whether the publish is confirmed, which are relevant for an operation with no annotations or output schema.

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?

The description is two concise sentences that front-load the core purpose and then add a helpful usage example. Every sentence contributes meaning; there is no redundancy or unnecessary details.

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 simple publish tool with 4 parameters, no output schema, and no annotations, the description provides a clear use case and example but omits details about optional parameters, expected return behavior, and error handling. It is adequate for basic invocation but not fully complete for risk-free autonomous use.

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

Parameters2/5

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

Schema coverage is 0%, yet the description only explains 'topic' (with a usage example) and 'payload' by name. The optional parameters 'qos' and 'retain' are not mentioned at all, and no additional meaning is added for payload. Given the low schema coverage, this is insufficient for full parameter understanding.

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 description clearly states the tool publishes a message to a device using MQTT topic and payload. It explicitly distinguishes itself from siblings by linking usage to controlling a device and referencing the 'discover' tool for topic discovery. The example reinforces the purpose and scope.

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?

Provides explicit guidance: use when asked to control a device, with the topic discovered from the 'discover' tool. Includes a concrete example. However, it does not mention when not to use it (e.g., for reading data, which may be covered by 'query'), leaving a slight gap in alternative selection.

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/emqx/aiot-mcp-server'

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