Skip to main content
Glama
ethanj2k

tuya-local-mcp

by ethanj2k

set_datapoint

Write a raw Tuya datapoint to control devices unsupported by helper tools, such as fans, curtains, heaters, and valves. Use get_status to discover exposed datapoints and their types.

Instructions

Write a raw Tuya datapoint.

The escape hatch for products whose datapoints the helper tools do not cover - fans, curtains, heaters, valves. Call get_status first to see which datapoints a device exposes and what types they hold.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpYes
valueYes
deviceYes

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
Behavior2/5

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

With no annotations, the description must disclose all behavioral traits, but it only states the mutating action ('Write') and gives a prerequisite. It does not mention potential risks, error handling, whether setting an invalid type/value is destructive, or any side effects. The phrase 'escape hatch' hints at advanced use but is not an explicit warning.

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 brief and to the point. The core purpose is in the first sentence, and the usage guidance is concise. No extraneous words or redundant details.

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?

It provides the critical prerequisite (get_status) and contextualizes the tool as a fallback, which is helpful. However, it omits details about error handling, what the output schema returns (though an output schema exists), and any cautionary notes about irreversible changes. For a raw write tool, this feels incomplete but not severely lacking.

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

Parameters2/5

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

The input schema has zero description coverage, so the description must compensate. It mentions 'datapoints' and 'types' and advises calling get_status, which implies dp is the datapoint ID and value must match the expected type, but it does not explain the format or acceptable values for dp or value. This is insufficient for an unannotated 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 clearly states the action: 'Write a raw Tuya datapoint.' It also defines the scope by naming the product categories it serves (fans, curtains, heaters, valves) and explicitly positions it as an 'escape hatch' relative to helper tools, which differentiates it from the sibling setter tools like set_power and set_brightness.

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

Usage Guidelines5/5

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

It explicitly tells when to use this tool ('escape hatch for products whose datapoints the helper tools do not cover') and provides a prerequisite step ('Call get_status first to see which datapoints a device exposes and what types they hold'). This gives clear context and implies the alternative is to use the specialized setters when they apply.

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