mqtt_publish
Publish MQTT messages to control IoT devices by specifying sender device ID, target topic with action, and payload content to trigger actions on connected devices.
Instructions
發布 MQTT 訊息
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": {
"deviceId": "<deviceId>",
"topic": "<topic>",
"payload": "<payload>"
},
"name": "mqtt_publish"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qos | No | QoS 等級 (預設: 0) | |
| topic | Yes | 目標裝置ID.動作,如 "targetDevice.action" | |
| payload | Yes | 訊息內容 | |
| deviceId | Yes | 發送方裝置 ID |