Skip to main content
Glama

CipherHUB Cryptography Toolkit

generate_random_data

Read-only

[random] 生成安全随机字节:腾讯云 KMS 随机数种子池 + 本地随机输入,经 HKDF-SHA256 派生;KMS 不可用时自动降级到本地软件种子池。data_length 指定字节数(1-128),返回 data_in_hex 十六进制字符串。返回字段:data_in_hex(随机数据 Hex 编码)、data_length(实际字节数)。

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": {
      "data_length": "<data_length>"
    },
    "name": "generate_random_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
data_lengthYes随机数据字节数(整数,1~128)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / data_length / description
      Added value: +"随机数据字节数(整数,1~128)"
  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 and openWorldHint=false, but the description adds substantive behavior: two entropy sources mixed through HKDF-SHA256, and an automatic, silent degradation to a local software seed pool when KMS is unavailable. That degradation disclosure is genuinely security-relevant and not derivable from any structured field. It stops short of describing output format guarantees or any indication that callers can detect degraded mode, which keeps it below 5.

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 paragraph, front-loaded with the purpose and mechanism before the parameter and return details. The trailing "返回字段" enumeration is slightly redundant next to the earlier "返回 data_in_hex" mention, but it is short and informative rather than padding.

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 usefully names both return fields (data_in_hex, data_length) and explains the hex encoding, which is exactly what the agent needs. With one required parameter fully documented in the schema and annotations covering safety, nothing essential is missing; only the degraded-mode observability gap remains.

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% and the schema already states "随机数据字节数(整数,1~128)". The description repeats the same 1-128 bound for data_length without adding units, validation behavior, or error semantics beyond it. Baseline 3 is appropriate since the schema carries the parameter documentation.

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?

States a specific verb and resource ("生成安全随机字节" / generate secure random bytes) and immediately qualifies the mechanism (KMS seed pool + local entropy via HKDF-SHA256). This clearly separates it from the sibling key-generation tools (generate_rsa, generate_sm2, generate_ecc) which produce key material rather than raw bytes.

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: the [random] tag and the phrase "生成安全随机字节" suggest it is the tool for raw random output, and the 1-128 byte bound implies its scope. There is no explicit statement of when to prefer it over siblings, nor any exclusion such as "not for key generation" — the agent must infer that from the sibling names.

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.