tuya_set_switch
Turn a Tuya smart light on or off by specifying its device ID and desired state, enabling direct control of Tuya switches from the MCP server.
Instructions
Turn a Tuya smart light on or off
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>",
"on": "<on>"
},
"name": "tuya_set_switch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| on | Yes | true to turn on, false to turn off | |
| deviceId | Yes | Tuya device ID |