Skip to main content
Glama

tuya_send_command

Send custom commands to Tuya smart devices by device ID or name. Provide a JSON string of commands to control device functions directly.

Instructions

Send custom commands to a Tuya device by device_id or name (e.g. 'Living Room Light'). commands must be a JSON string like: [{"code": "switch_1", "value": true}]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandsYes
device_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description must disclose behavior but provides scant detail. It mentions the commands format and that device_id or name can be used, but does not disclose side effects (e.g., state changes), error handling, or any prerequisites like permissions. This is a significant gap for a tool that can send arbitrary commands, potentially altering device behavior in unexpected ways.

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 a single, well-structured sentence that front-loads the core purpose, followed by the essential parameter detail and example. No wasted words; every part earns its place.

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?

The tool is relatively simple (two parameters) and has an output schema, so return values need not be described. However, the description lacks any mention of when to use this tool over the many specialized siblings, and it does not address potential failure modes or the scope of 'custom commands'. These gaps make it only minimally complete.

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

Parameters4/5

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

Schema description coverage is 0%, but the description compensates by explaining the commands parameter with a concrete example and clarifying that device_id can be a friendly name. This adds meaning beyond the bare 'string' type in the schema, though it could go further by describing command syntax details or available codes.

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 tool's function: 'Send custom commands to a Tuya device'. It specifies a specific verb ('Send'), a resource ('Tuya device'), and a scope ('custom commands'). This distinguishes it from the more specific sibling tools (e.g., turn_on, set_brightness) which handle predefined actions, making the purpose unmistakable.

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 usage through an example ('commands must be a JSON string like...') but does not explicitly state when to use this tool versus the many sibling tools. It lacks guidance on when custom commands are appropriate or when alternative specific tools should be preferred, leaving the agent to infer from context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/juanmartinsantos/mcp-server-tuya'

If you have feedback or need assistance with the MCP directory API, please join our Discord server