Skip to main content
Glama
ethanj2k

tuya-local-mcp

by ethanj2k

set_power

Turn any Tuya or Smart Life device on or off directly over your local network, with optional datapoint override for custom relay switches.

Instructions

Turn a device on or off.

switch_dp overrides the datapoint carrying the relay/switch. Leave it unset to let tinytuya pick, which is correct for the large majority of plugs, switches and bulbs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
onYes
deviceYes
switch_dpNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the core effect (power on/off) and an implementation behavior (switch_dp override/default behavior), which goes beyond the bare schema. However, it does not mention permissions, reversibility, edge cases, or failure behavior.

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

Conciseness5/5

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

The description is compact and front-loads the main action in the first sentence. The second paragraph adds necessary parameter nuance without waste. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple three-parameter tool with an output schema, the description covers the core purpose and the one non-obvious parameter. It could briefly mention that 'device' refers to a device identifier from list_devices, but the tool name and sibling context make that inferable.

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 description coverage is 0%, so the description must compensate. It explains switch_dp's override function and the recommended 'unset' default for most devices, but does not clarify the 'device' parameter beyond its name and type. 'on' is self-explanatory but still undocumented in the schema.

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

Purpose5/5

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

The description states an explicit action ('Turn a device on or off') on a clear resource (a device). This is distinct from sibling tools like set_brightness or set_color, which target different aspects of device control.

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

Usage Guidelines3/5

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

The description implies when to use the tool by defining its function, but it does not explicitly contrast with alternatives such as set_datapoint, nor does it state when not to use it. The switch_dp guidance is parameter-level, not tool-selection-level.

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