Skip to main content
Glama
serial-hub-mcp

serial-hub-mcp

by yhuan416

设置 DTR/RTS 控制线

set_dtr_rts

Sets serial DTR/RTS control-line levels and can pulse a line for Arduino reset or step ESP32 download-mode timing, leaving unspecified lines unchanged.

Instructions

设置串口 DTR/RTS 调制解调控制线电平。未传的线保持不动。pulse_ms>0 时先设为给定值、保持该时长后自动反转(一次完成"拉低→放高"之类的复位时序,如 Arduino 自动复位)。需要多拍精确时序(如 ESP32 进下载模式)时,可分多次调用本工具逐拍设置。返回最终 dtr/rts 电平。

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": {
      "connection_id": "<connection_id>"
    },
    "name": "set_dtr_rts"
  }
}

Input Schema

NameRequiredDescriptionDefault
dtrNoDTR 电平,true=assert;省略则不动
rtsNoRTS 电平,true=assert;省略则不动
pulse_msNo设置后保持的毫秒数,届时反转(复位时序)
connection_idYes连接 ID(由 open 返回)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that omitted lines are left untouched, that pulse_ms holds the value then auto-reverses, and that the final dtr/rts levels are returned. It does not cover error cases (e.g., closed connection) or whether line toggling can disturb an in-flight transfer, which keeps it short of a 5.

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 text is front-loaded with the core action, then semantics, then usage patterns, and every sentence carries information. It is dense but not padded; a small amount of repetition around pulse behavior is acceptable.

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 four-parameter hardware control tool with no output schema, the description covers purpose, side effects on unset lines, pulse behavior, multi-call strategy, and even the return value. Only failure modes and interaction with concurrent reads/writes are left unstated.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: pulse_ms is framed as a one-shot reset sequence (pull-low then release-high) rather than a bare hold duration, and the multi-call pattern for precise beat-by-beat timing is explained. That is value beyond the schema's wording.

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 first sentence states a specific verb and resource: set the DTR/RTS modem control line levels of a serial port. It is immediately distinguishable from data-path siblings such as write/send/transact because it manipulates control lines rather than payload.

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 when-to-use context: pulse_ms for a single reset pulse (Arduino auto-reset) versus repeated calls for multi-beat timing (ESP32 download mode). It does not explicitly exclude or compare against siblings like send_break, but the usage conditions for this tool are unambiguous.

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