Skip to main content
Glama

Validate Frame

validate_frame
Read-onlyIdempotent

Validate protocol frames against specification checklists for Modbus TCP, FINS/TCP, and MELSEC 3E. Returns pass/fail per check without requiring a device connection.

Instructions

对一帧报文跑规范校验清单, 逐项 pass/fail (不需要连接设备)。

Modbus TCP: MBAP 长度一致性、协议号、功能码、unit 范围、PDU 自洽、数量/地址边界、异常码 (Modbus TCP 无 CRC, RTU 才有)。 FINS/TCP: magic、TCP 长度自洽、TCP 命令合法、error 字段、 FINS 端结码、载荷完整性。 MELSEC 3E: 副头部、数据长度自洽、命令/软元件代码、结束代码。 direction 取 req 或 resp。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protocolYes
directionNoresp
frame_hexYes
frame_formatNo3e_binary

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive. The description adds behavioral detail: it supports exactly three protocols, runs a checklist per protocol, and clarifies the direction parameter. It also notes a Modbus TCP nuance (no CRC, unlike RTU). This goes beyond the annotations without contradicting them.

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 a compact paragraph that front-loads the core purpose, then organizes protocol-specific checks in a list-like format. It is efficient, though slightly dense with technical terms. No wasted words, but could be more scannable with bullet points.

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?

Given the tool's complexity (multiple protocols and many validation items) and zero schema coverage, the description is reasonably complete for its core function. However, it omits details on frame_hex formatting and frame_format options, and does not describe the output structure (though an output schema exists). The protocol-specific check lists are thorough, but the parameter gaps lower completeness.

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

Parameters2/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 parameters. It clarifies 'direction' (req or resp) and implicitly defines 'protocol' by listing supported protocols, but it does not explain 'frame_hex' format (e.g., with/without separators) nor 'frame_format' beyond the default '3e_binary'. This is a significant gap given zero schema help.

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 validates a frame against a specification checklist, producing pass/fail per item. It names the specific protocol checks (Modbus TCP, FINS/TCP, MELSEC 3E) and explicitly notes it requires no device connection, distinguishing it from sibling tools like parse_frame (which would decode) and probe_device (which requires a device).

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 context by stating 'no need to connect device' and by listing the protocols it handles, but it does not explicitly say when to use this tool versus parse_frame or get_proxy_frames. It gives context (offline validation) but lacks explicit exclusions or alternative routing.

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