Skip to main content
Glama

CipherHUB Cryptography Toolkit

block_cipher

[symmetric_cipher] 分组密码 CBC 模式加解密。 【算法】AES128(key=16B) / AES256(key=32B) / SM4(key=16B)。 【参数】

  • algorithm:算法名

  • process_type:Encrypt 或 Decrypt

  • input_data_in_hex:明文或密文 Hex(1B~16MB)

  • key_in_hex:密钥 Hex

  • iv_in_hex:初始向量 Hex(固定 16 字节 = 32 hex 字符) 【自动行为】加密自动 PKCS7 填充,解密自动去填充。 【输出】output_data_in_hex、output_length、output_sha256、algorithm。 【注意】解密时密文长度必须为 16 字节整数倍。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
algorithmNo密码算法名称(具体可选值因工具而异,见工具描述)AES256
iv_in_hexNo初始向量的十六进制字符串,固定 32 个 hex 字符(16 字节)
key_in_hexNo密钥的十六进制字符串。长度取决于算法:AES256=64 字符(32B),AES128/SM4=32 字符(16B)
process_typeNo操作类型,可选值:Encrypt / DecryptEncrypt
input_data_in_hexNo输入数据的十六进制字符串(加密时为明文,解密时为密文,1B~16MB)

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are provided, but the description discloses important behaviors: automatic PKCS7 padding on encryption and auto-removal on decryption, fixed 16-byte IV, output fields (output_data_in_hex, output_length, output_sha256, algorithm), and the requirement that decryption ciphertext lengths be multiples of 16 bytes. This goes well beyond what the schema provides.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well organized with labeled sections (算法, 参数, 自动行为, 输出, 注意) and front-loads the core operation. Every section conveys distinct operational information without redundancy or filler.

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?

Even without an output schema, the description specifies the output fields and critical constraints (algorithm-key length mapping, IV length, input size, padding behavior, decryption length requirement). This is sufficient for correct invocation and use of the tool.

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?

The input schema already documents all five parameters with 100% coverage, so the baseline is 3. The description adds useful semantic details such as key length per algorithm (16B vs 32B), IV fixed at 32 hex characters, and the decryption input length constraint, which are not fully obvious from the schema alone.

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 opens with '分组密码 CBC 模式加解密' (block cipher CBC mode encryption/decryption), giving a specific verb and resource. It further distinguishes itself from siblings like stream_cipher and zuc_cipher by naming CBC mode and the supported algorithms AES128/AES256/SM4.

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 labels the tool as a symmetric block cipher in CBC mode and lists algorithm choices, making its intended use clear. However, it does not explicitly compare against sibling tools such as stream_cipher or state when not to use this tool, leaving usage guidance mostly implicit.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools target a distinct algorithm+operation pair (e.g., rsa_sign vs sm2_sign vs ml_dsa_sign), and descriptions are detailed. However, block_cipher and stream_cipher both perform symmetric encryption, and ecc_key_exchange and hybrid_kex overlap as key exchange, requiring careful reading to distinguish.

Naming Consistency3/5

Naming is inconsistent across algorithm families: key generation mixes generate_ecc/generate_rsa with ml_dsa_keygen/ml_kem_keygen, and encryption mixes rsa_encryption/sm2_encryption with block_cipher/stream_cipher. Within each family (e.g., rsa_sign/rsa_verify, ml_dsa_sign/ml_dsa_verify), names are predictable, but the overall pattern is not uniform.

Tool Count2/5

32 tools is far above the typical 3-15 range for a well-scoped server. While every tool has a distinct function, the large surface makes the set heavy and harder to navigate, especially with multiple algorithm families and niche utilities.

Completeness5/5

The toolkit gives comprehensive coverage: key generation, encryption/decryption, signing/verification for RSA, ECC, SM2, ML-DSA, ML-KEM, plus symmetric ciphers, hashing, and key exchange. Full workflows are supported with no dead ends, and even helper tools for debugging are included.