Skip to main content
Glama

CipherHUB Cryptography Toolkit

generate_random_data

[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?

With no annotations, the description carries the full burden, and it does well: it names the entropy sources (Tencent Cloud KMS seed pool plus local input), the derivation function (HKDF-SHA256), and the automatic fallback to a local software seed pool when KMS is unavailable. It also states the output encoding. What is missing is rate limits, whether outputs are reproducible, and whether the KMS call requires credentials or network access.

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 dense but front-loaded: the entropy pipeline comes before the parameter and return details. There is minor redundancy in that the hex return format is stated twice (in the body and in the field list), but since no output schema exists, that repetition is tolerable.

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?

For a single-parameter tool with no output schema, the description supplies what the schema cannot: the return fields data_in_hex and data_length, the actual-byte-count semantics, and the degradation behavior. Additional detail on credential requirements for the KMS path would make it 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 coverage is 100%, so the schema already documents the 1-128 byte range and integer type. The description states the same range and units without adding syntax or constraint meaning beyond the schema, so the baseline of 3 applies.

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 states a specific verb and resource: 'generate secure random bytes' ([random] 生成安全随机字节). It also distinguishes itself from the many key-generation siblings by emphasizing raw byte output with a fixed length, so an agent can rule out generate_rsa, generate_ecc, or key_derivation without opening any schema.

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: an agent should use it when it needs raw random bytes, but the description never says when to prefer this over siblings such as key_derivation or a hash-based expansion, and gives no exclusions or prerequisites. The caller has to infer the use case from the name and the [random] tag alone.

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.