Skip to main content
Glama

set_relay

Turn a device's relay output on or off to control pumps, valves, sirens, and other equipment connected to ZONT controller discrete outputs.

Instructions

Включить или выключить реле (дискретный выход) устройства.

Параметры: device_id: идентификатор устройства. portname: имя порта реле (из z3k_config или io устройства). Примеры: "relay1", "relay2", "siren". enabled: True — включить, False — выключить.

Используй для управления насосами, клапанами, сиренами и любым оборудованием, подключённым к дискретным выходам контроллера.

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": {
      "device_id": "<device_id>",
      "portname": "<portname>",
      "enabled": "<enabled>"
    },
    "name": "set_relay"
  }
}

Input Schema

NameRequiredDescriptionDefault
enabledYes
portnameYes
device_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.2

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full behavioral burden. It discloses that this actively toggles physical relay hardware, but it does not mention permissions, safety implications, idempotency, or what happens when the relay is already in the requested state.

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 purpose is front-loaded, followed by a compact parameter list and then practical usage examples. Given that the schema has no parameter descriptions, the extra parameter detail is warranted and not wasteful.

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?

The tool is simple, has only three required parameters, and an output schema exists, so the description does not need to explain return values. It covers purpose, parameters, and typical usage, though it could be more complete by addressing alternatives or safety behavior for physical relay control.

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%, so the description must explain all three parameters, and it does: device_id is the device identifier, portname is the relay port with source and examples, and enabled maps True/False to on/off. The only minor gap is that device_id format or source is not further specified.

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?

The description states a specific action and resource: turning a device relay/discrete output on or off. It is clear what the tool does, but it does not explicitly differentiate itself from the sibling set_io_port_value or similar discrete-output tools.

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

Usage Guidelines4/5

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

It gives clear usage context by naming pumps, valves, sirens, and other equipment wired to discrete outputs. It does not state when not to use it or point to an alternative such as set_io_port_value, so the guidance is clear but not complete.

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