Skip to main content
Glama

CipherHUB Cryptography Toolkit

zuc_cipher

Read-only

[symmetric_cipher] ZUC-128 流密码(中国商密算法)。由于 ZUC 是对称流密码,加解密为同一操作,传入明文即输出密文,反之亦然。key_in_hex 固定 16 字节(32 hex 字符),iv_in_hex 固定 16 字节(32 hex 字符),input_data_in_hex 原始数据长度 1B ~ 16MB。返回字段:output_data_in_hex(输出 Hex)、output_length(字节数)。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "zuc_cipher"
  }
}

Input Schema

NameRequiredDescriptionDefault
iv_in_hexNo初始向量的十六进制字符串,固定 32 个 hex 字符(16 字节)
key_in_hexNo密钥的十六进制字符串。长度取决于算法:AES256=64 字符(32B),AES128/SM4=32 字符(16B)
input_data_in_hexNo输入数据的十六进制字符串(加密时为明文,解密时为密文,1B~16MB)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / input_data_in_hex / description
      Added value: +"输入数据的十六进制字符串(加密时为明文,解密时为密文,1B~16MB)"
    • addedInput schema / properties / iv_in_hex / description
      Added value: +"初始向量的十六进制字符串,固定 32 个 hex 字符(16 字节)"
    • addedInput schema / properties / key_in_hex / description
      Added value: +"密钥的十六进制字符串。长度取决于算法:AES256=64 字符(32B),AES128/SM4=32 字符(16B)"
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true and openWorldHint=false, so the safety profile is already covered; the description adds real value by specifying the accepted input size window (1B–16MB) and, with no output schema present, explicitly naming the return fields output_data_in_hex and output_length. It does not cover error behavior for oversized or malformed hex input.

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 algorithm identity and category are front-loaded, followed by the bidirectional-operation note, then constraints, then return fields — a logical order. It is dense but every sentence carries information; only the bracketed tag is slightly redundant with the algorithm name.

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

Completeness5/5

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

For a three-parameter cipher tool with no output schema, the description covers the operation semantics, all required hex-encoding constraints, the valid input range, and the shape of the return value. There is nothing an agent would need in order to invoke it correctly that is missing.

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 already 100%, so the baseline is 3, but the description adds meaning the schema lacks: it pins key_in_hex and iv_in_hex to exactly 32 hex characters (16 bytes) for this algorithm, which corrects the schema's generic note about AES256/AES128/SM4 key lengths. It also restates the input payload bounds, reinforcing the length constraint.

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 the specific algorithm (ZUC-128, a Chinese commercial stream cipher) and its category tag [symmetric_cipher], so an agent can distinguish it from block_cipher/ctr_cipher siblings by algorithm rather than guessing. It stops short of explicitly routing to a sibling for other stream ciphers, which keeps it below a 5.

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?

It clarifies an important operational fact — that encryption and decryption are the same call, so plaintext in yields ciphertext and vice versa — which is genuine usage context. However, it never states when to choose ZUC over the sibling stream_cipher or ctr_cipher tools, nor any prerequisites or exclusions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.