Skip to main content
Glama

CipherHUB Cryptography Toolkit

hash_sum

[hash_digest] 计算消息摘要(支持多算法批量计算)。 【支持算法】Sha1 / Sha224 / Sha256 / Sha384 / Sha512 / Sm3 / Shake128 / Shake256。 【参数】

  • plain_in_hex:明文 Hex 字符串(原始数据 1B ~ 16MB)

  • required_hash_modes:字符串数组,指定需要计算的算法列表,默认计算全部算法

  • shake_output_length:SHAKE 系列的输出字节长度(32~256,默认 64),仅在 required_hash_modes 包含 Shake128 或 Shake256 时生效 【输出】Results 字典,每个算法对应 hash_sum_in_hex(摘要 Hex)和 hash_length(字节数)。 【SHAKE 说明】SHAKE128/256 是 XOF(可扩展输出函数),输出长度可变,适合需要自定义长度密钥派生的场景。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
plain_in_hexNo原始数据的十六进制字符串(1B~16MB,即 2~33554432 个 hex 字符)
required_hash_modesNo哈希算法名称数组,指定需要计算的算法列表,可选值:Sha1 / Sha224 / Sha256 / Sha384 / Sha512 / Sm3 / Shake128 / Shake256(HMAC 不支持 Shake 系列)
shake_output_lengthNoSHAKE 系列输出字节长度(整数,32~256,默认 64)

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It fully discloses the output structure (Results dictionary with hash_sum_in_hex and hash_length), explains the SHAKE XOF behavior with variable output length and key derivation usage, and describes the conditional activation of shake_output_length. This goes far beyond the schema.

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-structured using sections for algorithms, parameters, output, and SHAKE notes. It is front-loaded with purpose and every listed item adds value without unnecessary verbosity.

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?

Given no annotations and no output schema, the description provides a complete standalone reference: it covers input constraints, default behaviors, conditional parameters, exact output format, and edge-case explanations for SHAKE. Very few gaps remain.

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 100%, providing baseline 3. The description adds extra meaning: required_hash_modes defaults to all algorithms, shake_output_length only takes effect when SHAKE modes are requested, and plain_in_hex has a size range. These enrich parameter understanding beyond the schema.

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 explicitly states the tool '计算消息摘要' (computes message digest) and lists all supported algorithms (Sha1, Sha224, Sha256, etc.), clearly distinguishing it from sibling tools like hmac_sum which focus on HMAC. It has a specific verb and resource.

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

Usage Guidelines4/5

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

It provides clear context for when to use the tool (computing hashes) and describes batch computation and algorithm selection. However, it does not explicitly contrast with alternatives like hmac_sum or state when not to use this tool, so it lacks explicit 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.

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.