Skip to main content
Glama
kinbeg

mcp-kr-controller

by kinbeg

wait_di_trigger

Monitor a digital input channel for a rising edge signal, then execute a configured relay action such as ping-pong or all relays on/off upon detection.

Instructions

监听指定 DI 通道的上升沿触发(无输入→有输入),触发后自动执行指定动作。轮询 READ_STATUS 检测状态变化,检测到触发后执行动作并返回结果。参数:address=设备地址, channel=监听的DI通道号(默认1), timeout=超时毫秒(默认60000), poll_interval=轮询间隔毫秒(默认200), action=触发后执行的动作(默认ping_pong, 可选all_relays_on/all_relays_off), start/end/count/delay=ping_pong动作参数。对应自然语言:检测到输入触发时执行、当DI1有信号时跑马灯、输入触发动画。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoping_pong 终止回路号 (1-16),默认 8。
countNoping_pong 来回次数,默认 1。
delayNoping_pong 每帧间隔(秒),默认 0.1。0.3 = 300ms 间隔。
startNoping_pong 起始回路号 (1-16),默认 1。
actionNo触发后执行的动作:ping_pong(默认) / all_relays_on / all_relays_off。ping_pong
addressNo设备地址/机器号 (1-254),即机器地址。可通过 scan_devices 自动发现,或用 list_devices 查看已注册设备。255为广播地址。
channelNo监听的 DI 通道号 (1-16),默认 1。
timeoutNo等待超时(毫秒),默认 60000(60秒)。超时后返回未触发。
poll_intervalNo轮询间隔(毫秒),默认 200。越小响应越快但串口负载越高。
Behavior4/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 polling mechanism (poll READ_STATUS), the trigger condition (no input→has input), and that it executes the action and returns a result. It also implies blocking behavior via the timeout parameter. However, it doesn't detail the exact return value format or potential side effects of executing relay actions.

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?

The description is structured logically: main behavior, parameter summary, and natural language examples. It is slightly redundant with the schema (repeating parameter names and defaults), but the examples and behavioral overview earn their place. Each section is concise and the overall length is appropriate for a tool with 9 parameters.

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 description provides a comprehensive overview of the tool's purpose, behavior, and parameters, along with natural language mappings. However, there is no output schema or mention of the return value structure, leaving some ambiguity about what 'returns result' means. Given the complexity and sibling tools, it's mostly complete but could benefit from a brief note on the expected response.

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 100%, so the baseline is 3. The description lists all parameters and their defaults, but the schema already provides detailed descriptions for each. The description groups start/end/count/delay as 'ping_pong action parameters', adding marginal value by clarifying their purpose, but it doesn't go beyond 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 clearly states the tool monitors a DI channel's rising edge trigger and automatically executes a specified action, with natural language examples like 'detect input trigger' and 'run light when DI1 has signal'. This distinguishes it from sibling tools like read_status (which only reads status) and ping_pong (which executes an action without waiting for a trigger).

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?

The description provides clear context for when to use the tool (monitoring a DI trigger and executing an action), supported by natural language mappings. However, it does not explicitly mention alternatives or exclusion criteria, such as 'use read_status for direct status reads' or 'use ping_pong directly without waiting'.

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/kinbeg/mcp-kr-controller'

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