MCP Server for Modbus TCP — let AI agents read/write PLC registers by name
Server has 8 tools with basic schemas and descriptions, but quality is inconsistent. All tools have descriptions (good), but many are bilingual (English + Chinese) and lack depth. Parameter descriptions are present but minimal. No output schemas documented. Error handling returns JSON errors but lacks recovery guidance. Tool naming follows verb_noun pattern (list_, read_, write_, device_, scan_) which is good. However, descriptions average ~80 chars (below 194-char baseline) and lack context on when to use each tool vs. alternatives. Raw mode tools (read_registers, write_registers, scan_registers) expose low-level Modbus details that could confuse LLMs about which tool to choose. No tool annotations (readOnlyHint, destructiveHint) despite clear risk levels.
Check if a device is online and reachable. 檢查設備是否在線。
List all configured Modbus devices from the profile. 列出所有已配置的 Modbus 設備。
List all registers of a device with metadata. 列出設備所有寄存器及其 metadata。
Read a named register from a device. Returns converted value with unit. 讀取設備的命名寄存器,回傳轉換後的值與單位。
Raw read: Read Modbus registers by address. Raw 模式:直接讀取 Modbus 寄存器。
Scan a range of holding registers for non-zero values. 掃描 holding register 位址範圍,找出有值的寄存器。
Write a value to a named register on a device. 寫入值到設備的命名寄存器。
No output schemas documented. Tools return JSON strings but LLMs cannot infer field structure, forcing them to parse unstructured text. This violates pattern:response-shaper and increases hallucination risk.
Descriptions lack context on when to use profile mode vs. raw mode. LLMs cannot distinguish between list_devices (profile-based) and read_registers (raw Modbus). No guidance on prerequisites or dependencies.
Error handling returns generic JSON errors without recovery guidance. E.g., 'KeyError' or 'Exception' strings do not tell LLM what to do next. Violates pattern:recovery-guide.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | <=2025-11-25 | v2 |
Raw write: Write values to Modbus registers. Raw 模式:直接寫入 Modbus 寄存器。
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk levels. write_device and write_registers are destructive but unmarked. Violates current MCP spec (2026-07-28) tool annotation requirement.
Bilingual descriptions (English + Chinese) are verbose and waste tokens. Descriptions average ~80 chars but lack actionable detail (baseline 194 chars). E.g., 'Read a named register from a device. Returns converted value with unit.' does not explain when to use read_device vs. read_registers.