Skip to main content
Glama

CipherHUB Cryptography Toolkit

ml_dsa_keygen

Read-only

[pqc_signature] 生成 ML-DSA 密钥对(FIPS 204,后量子数字签名标准)。 【算法选择】algorithm 支持 ML-DSA-44(NIST Level 2)/ ML-DSA-65(Level 3,默认)/ ML-DSA-87(Level 5)。 【安全等级参考】ML-DSA-44 ≈ AES-128 / ML-DSA-65 ≈ AES-192 / ML-DSA-87 ≈ AES-256。 【输出】public_key_in_hex(SPKI DER hex)、public_key_in_base64、private_key_in_hex(PKCS#8 DER hex)、private_key_in_base64、algorithm、nist_level、public_key_bytes、private_key_bytes。 【典型用途】生成密钥对后,私钥用于 ml_dsa_sign 签名,公钥用于 ml_dsa_verify 验签。

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

Input Schema

NameRequiredDescriptionDefault
algorithmNo密码算法名称(具体可选值因工具而异,见工具描述)ML-DSA-65

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / algorithm / description
      Added value: +"密码算法名称(具体可选值因工具而异,见工具描述)"
    • addedInput schema / properties / algorithm / enum
      Added value: +[
      +  "ML-DSA-44",
      +  "ML-DSA-65",
      +  "ML-DSA-87"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, consistent with a stateless local computation that persists nothing, so no contradiction. Beyond that, the description discloses what is produced and in which encodings (SPKI DER hex/base64, PKCS#8 DER hex/base64), the NIST level per algorithm, and implicitly that the private key is the sensitive half used for signing. It does not say the keypair is randomly generated and non-reproducible, nor that the private key should not be logged, which would be the remaining useful disclosures.

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?

Front-loaded with the family tag and a one-line purpose, then organized into bracketed sections (算法选择 / 安全等级参考 / 输出 / 典型用途) with no filler sentences. The enumerated output field list is long, but it is justified because there is no output schema. Slightly dense formatting is the only cost.

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?

For a single optional-enum parameter tool with no output schema, the description covers everything an agent needs: the algorithm options with security levels, the default, the exact return field names and encodings, and the follow-up tools for each key half. Nothing material is missing for correct invocation.

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

Parameters5/5

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

Schema coverage is 100%, but the schema description explicitly punts ('具体可选值因工具而异,见工具描述'), so the description is the only place the enum values are explained. It maps each value to a NIST level and an AES-equivalent strength (ML-DSA-44 ≈ AES-128, -65 ≈ AES-192, -87 ≈ AES-256) and names -65 as the default, which is real meaning an agent cannot get from the raw enum.

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 (生成 ML-DSA 密钥对) and anchors it to a named standard (FIPS 204, 后量子数字签名标准), plus a [pqc_signature] family tag. The 典型用途 section explicitly separates this tool's role from ml_dsa_sign and ml_dsa_verify, so an agent can place it in the workflow without opening a schema.

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?

Gives clear downstream context: after generating, the private key feeds ml_dsa_sign and the public key feeds ml_dsa_verify, which tells the agent when this tool is the right first step. It also implies the default (ML-DSA-65) so an agent can call with no arguments. It lacks any explicit 'when not to use' or guidance on choosing between this and other keygen siblings such as ml_kem_keygen, so it falls short of a 5.

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.