Skip to main content
Glama

CipherHUB Cryptography Toolkit

generate_sm9

Read-only

[sm9_ibc] 生成 SM9 标识密码主密钥(GM/T 0044,GmSSL C 实现)。key_kind='Sign' 生成签名主密钥(验签方持主公钥),'Enc' 生成加密主密钥(加密方持主公钥),默认 Enc。输出:master_public_key_in_pem(明文主公钥,分发给所有用户)与 master_private_key_in_pem(ENCRYPTED 口令加密主私钥,KGC 自留)。private_key_password 必填,1-32 UTF-8 字节。SM9 私钥 PEM 只有加密形态(无明文导出)。

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

Input Schema

NameRequiredDescriptionDefault
key_kindNoSM9 主密钥类型,可选值:Sign(签名主密钥)/ Enc(加密主密钥)Enc
private_key_passwordNo私钥的加密密码(原始字符串,非编码格式),可选

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/openWorldHint; the description adds substantive behavior — the returned PEM fields, the fact that the private key is always password-encrypted and cannot be exported in plaintext, and the 1-32 UTF-8 byte password constraint. Note it calls private_key_password 必填 while the schema lists it as optional with an empty default; that is a schema inconsistency rather than an annotation contradiction, and it usefully warns the agent to supply a password.

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 action and standard, then the key_kind semantics, then the outputs, then the password rule — a logical order with no filler. It is dense and parenthetical-heavy, but every clause carries information an agent needs.

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?

There is no output schema, so the description carries the burden and does so fully: both returned fields are named with their meaning and handling rules, and the 'no plaintext private key export' constraint is stated. Nothing essential for a correct first call is missing.

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%, so the baseline is 3; the description goes beyond it by spelling out the security consequence of each key_kind (who holds the public key) and by imposing a concrete length/encoding rule on the password that the schema does not state. The only blemish is the mismatch with the schema's optional/empty-default password.

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 concrete verb and resource ('生成 SM9 标识密码主密钥'), tagged with the [sm9_ibc] namespace, plus the standard it implements (GM/T 0044, GmSSL C). It distinguishes the two variants — 'Sign' yields a signing master key for verifiers, 'Enc' an encryption master key for encryptors — so an agent can tell exactly which mode it is invoking.

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 implied rather than prescribed: the description explains that the public key is distributed to all users and the private key stays with the KGC, and notes the default is 'Enc'. It never says when to pick this over the sibling key-derivation step (sm9_extract_key) or the SM9 sign/encrypt tools, so the workflow position must be inferred.

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.