mqtt_publish
Publish a message to an MQTT topic with adjustable quality of service and retain flag.
Instructions
Publish a message to an MQTT topic
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 |
|---|---|---|---|
| topic | Yes | The MQTT topic to publish to | |
| message | Yes | The message payload to publish | |
| qos | No | Quality of Service level (0, 1, or 2). Default is 0 | |
| retain | No | Whether to retain the message on the broker. Default is false |