Skip to main content
Glama

CipherHUB Cryptography Toolkit

sm9_sign

[sm9_ibc] [sm9_ibc] SM9 标识签名(GM/T 0044)。签名者用 KGC 派发的用户钥签名:输入 user_private_key_in_pem(SM9ExtractKey key_kind=Sign 输出)、private_key_password(用户钥口令)、data_in_hex(消息原文 hex,签名前内部先算 SM3 摘要,流式处理,仅支持原文模式)。输出:signature_in_hex / signature_in_base64(DER 编码签名,固定 104 字节)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_in_hexNo数据的十六进制字符串。RAW 模式为消息原文 Hex,DIGEST 模式为哈希摘要 Hex
private_key_passwordNo私钥的加密密码(原始字符串,非编码格式),可选
user_private_key_in_pemNoSM9 加密用户私钥的 PEM 文本(含 BEGIN ENCRYPTED SM9 ... PRIVATE KEY 头尾,由 SM9ExtractKey 派发)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It goes beyond the basic operation by revealing that SM3 digesting is performed internally, processing is streaming, only original-message mode is supported, and the output is a DER-encoded signature fixed at 104 bytes in hex or base64. This gives an agent meaningful operational expectations without an output schema.

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 compact and packs purpose, input semantics, processing behavior, and output format into a single dense paragraph. The duplicated '[sm9_ibc] [sm9_ibc]' prefix is unnecessary noise, but the content is otherwise efficiently organized with the standard first, then inputs, then behavior, then outputs.

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?

Given no annotations and no output schema, the description is reasonably complete: it states the purpose, required input source, processing mode, and output characteristics. Minor gaps include not explicitly mentioning that the private key password may be required for encrypted keys despite the schema marking it optional, and not covering error scenarios. Still, an agent has enough to select and invoke the tool correctly.

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?

Even though schema description coverage is 100%, the description adds important meaning: user_private_key_in_pem is specifically the output of SM9ExtractKey with key_kind=Sign, data_in_hex is the raw message (not a digest), and private_key_password is the user key passphrase. It also clarifies the output encoding and length, which the schema does not cover. This is a meaningful supplement to the schema fields.

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: SM9 identity-based signature (GM/T 0044), and clearly distinguishes this from sibling operations such as sm9_verify, sm9_encryption, and sm9_extract_key. It names the exact signer role and the KGC-issued user private key, so an agent can determine this tool is for signing, not verification or key extraction.

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?

The description specifies how to use the tool: provide the user private key in PEM from SM9ExtractKey with key_kind=Sign, the private key password, and raw message hex. It also includes an important exclusion: only raw message mode is supported, with SM3 digest computed internally, which prevents misuse with pre-hashed digests. It does not explicitly name alternatives like sm9_verify, but the context is clear enough.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools target a distinct algorithm+operation pair (e.g., rsa_sign vs sm2_sign vs ml_dsa_sign), and descriptions are detailed. However, block_cipher and stream_cipher both perform symmetric encryption, and ecc_key_exchange and hybrid_kex overlap as key exchange, requiring careful reading to distinguish.

Naming Consistency3/5

Naming is inconsistent across algorithm families: key generation mixes generate_ecc/generate_rsa with ml_dsa_keygen/ml_kem_keygen, and encryption mixes rsa_encryption/sm2_encryption with block_cipher/stream_cipher. Within each family (e.g., rsa_sign/rsa_verify, ml_dsa_sign/ml_dsa_verify), names are predictable, but the overall pattern is not uniform.

Tool Count2/5

32 tools is far above the typical 3-15 range for a well-scoped server. While every tool has a distinct function, the large surface makes the set heavy and harder to navigate, especially with multiple algorithm families and niche utilities.

Completeness5/5

The toolkit gives comprehensive coverage: key generation, encryption/decryption, signing/verification for RSA, ECC, SM2, ML-DSA, ML-KEM, plus symmetric ciphers, hashing, and key exchange. Full workflows are supported with no dead ends, and even helper tools for debugging are included.