Skip to main content
Glama

CipherHUB Cryptography Toolkit

hash_sum

Read-only

[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(可扩展输出函数),输出长度可变,适合需要自定义长度密钥派生的场景。

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": "hash_sum"
  }
}

Input 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)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / plain_in_hex / description
      Added value: +"原始数据的十六进制字符串(1B~16MB,即 2~33554432 个 hex 字符)"
    • addedInput schema / properties / required_hash_modes / description
      Added value: +"哈希算法名称数组,指定需要计算的算法列表,可选值:Sha1 / Sha224 / Sha256 / Sha384 / Sha512 / Sm3 / Shake128 / Shake256(HMAC 不支持 Shake 系列)"
    • addedInput schema / properties / required_hash_modes / enum
      Added value: +[
      +  "Sha1",
      +  "Sha224",
      +  "Sha256",
      +  "Sha384",
      +  "Sha512",
      +  "Sm3",
      +  "Shake128",
      +  "Shake256"
      +]
    • addedInput schema / properties / shake_output_length / description
      Added value: +"SHAKE 系列输出字节长度(整数,32~256,默认 64)"
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, which matches a pure local computation, so there is no contradiction. The description adds context beyond annotations: input size bounds (1B to 16MB), default of all algorithms, and SHAKE semantics for variable output length, all of which affect how an agent shapes a call. The description does not mention failure modes for an empty plain_in_hex or an out-of-range shake_output_length.

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 organized into labeled sections (algorithms, parameters, output, SHAKE note) and leads with the core verb and resource. It is somewhat long, and the parameter section duplicates the schema, but every block is scannable and serves a purpose.

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

Completeness4/5

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

There is no output schema, so the description carries the burden of explaining return values, and it does so by naming the Results dictionary with hash_sum_in_hex and hash_length per algorithm. All three parameters default, so a zero-required-argument call is safe, and the description makes clear what the defaults produce. A more explicit note on empty-input behavior would make it fully complete.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description largely restates the schema for plain_in_hex and required_hash_modes, but its note that shake_output_length applies only when Shake128/Shake256 is in the requested list adds real conditional meaning that is not spelled out in the schema field itself.

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 operation (computing a message digest) and its distinguishing capability (batch multi-algorithm digest calculation), plus an explicit algorithm list. It does not differentiate itself from the sibling hmac_sum, which is the closest-looking alternative, so it stops short of 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?

Usage is only implied by the description: an agent can infer this is the plain-digest tool and that SHAKE variants are for variable-length key derivation. There is no explicit when-to-use versus hmac_sum or key_derivation, and no stated exclusions beyond the note in the schema that HMAC does not support Shake.

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.