Skip to main content
Glama
nbrain-industrial-ot-zkteco-modbus

nbrain-industrial-ot-zkteco-modbus

frame_and_verify_modbus_pdu

Encode or decode Modbus RTU and TCP binary frames with CRC-16 and MBAP validation to inspect or verify protocol payloads.

Instructions

Encode or decode Modbus RTU (CRC-16 0xA001) and Modbus TCP (MBAP) binary frames.

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": {
      "mode": "<mode>"
    },
    "name": "frame_and_verify_modbus_pdu"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
slave_idNo
frame_hexNo
payload_hexNo
function_codeNo
transaction_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses the CRC-16 polynomial and MBAP wrapper, which is genuinely useful algorithmic context, but says nothing about whether decode validates/rejects bad CRCs, what errors surface for malformed hex, or what success looks like (hex string? parsed fields?). For a binary framing tool with zero annotation coverage, that is a substantial gap.

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?

A single compact sentence with the resource and protocol variants front-loaded; there is no wasted wording. It is arguably too terse for a six-parameter, four-mode tool, but that is a completeness issue rather than a structural one.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given six parameters with no schema descriptions, no annotations, no output schema, and mode-dependent required fields, this one-sentence description is not sufficient to call the tool correctly on the first attempt. The agent would need to guess which hex field and ID field to populate per mode, and has no expectation for the return value.

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% across six parameters, so the description is expected to compensate and does not. It never explains that payload_hex applies to encode modes while frame_hex applies to decode modes, nor that slave_id is required for RTU but transaction_id for TCP — which is the single most error-prone aspect of calling this tool. The mode names are self-describing, but the mode-conditional parameter contract is left entirely implicit.

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 names a specific verb pair (encode/decode) and a specific resource (Modbus RTU and TCP binary frames), and adds algorithm-level detail (CRC-16 0xA001, MBAP) that tells an agent this handles low-level framing rather than semantic Modbus operations. It is clearly distinguished from the sibling tools, which operate at the agent/command or timestamp-log level. It falls short of 5 only because the 'verify' half of the tool name is never addressed.

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

Usage Guidelines2/5

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

There is no statement of when to pick this tool, no guidance on choosing among the four modes, and no conditions under which decoding should be preferred over encoding. The agent must infer everything from the mode enum values in the schema.

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