Skip to main content
Glama
stream-deck-mcp
by sohumsuthar

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

NameRequiredDescriptionDefault
onYestrue to turn on, false to turn off
deviceIdYesTuya device ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does not say whether the device must be online, whether the call is idempotent, whether it fails on an invalid or offline deviceId, or whether the resulting state is confirmed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with zero filler. It is efficient, though the brevity contributes to the gaps in usage and behavioral detail rather than compensating for them.

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 two-parameter, fully documented mutation with no output schema, the definition is minimally sufficient. Missing are any statement of prerequisites, failure behavior, or how this differs from the other on/off siblings.

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

Parameters3/5

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

Schema coverage is 100% and both parameters are described in the schema, including the boolean polarity of "on". The description adds nothing beyond that, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Turn a Tuya smart light on or off" gives a specific verb and resource with the vendor named, which separates it from the hue_* and keylight_* families. It is less precise about whether the target is only lights or any Tuya switch device, and it does not distinguish itself from the sibling tuya_toggle or tuya_all_on/off.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this versus tuya_toggle, tuya_all_on, tuya_all_off, or the group-oriented hue_set_group. The agent must infer from the name alone that this targets a single device by ID.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.