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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic": "<topic>",
"message": "<message>"
},
"name": "mqtt_publish"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qos | No | Quality of Service level (0, 1, or 2). Default is 0. | |
| topic | Yes | The MQTT topic to publish to (e.g., 'agents/test/status') | |
| retain | No | Whether to set the retain flag on the message. Default is false. | |
| message | Yes | The message payload to publish |