Skip to main content
Glama

CipherHUB Cryptography Toolkit

sm2_private_key_structure_parse

[sm2] 解析 SM2 加密私钥(ENCRYPTED PRIVATE KEY PEM)结构,返回 ASN.1 内部字段的 JSON 视图。用于调试与教学,不会解出私钥值。返回字段:structure(ASN.1 结构 JSON,含加密算法 OID、盐、迭代次数等)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
private_key_in_pemNoSM2 加密私钥的 PEM 文本(含 BEGIN/END ENCRYPTED PRIVATE KEY 头尾)

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It clearly discloses that the tool does not reveal the private key value (a critical safety behavior), returns a JSON view of ASN.1 structure, and lists expected fields (OID, salt, iteration count). This goes beyond simple tautology and gives meaningful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short, front-loaded sentences. It starts with the tool's purpose, then covers safety and return format without any redundant or verbose language. Every sentence earns its place, making it highly concise and well-structured.

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?

Since there is no output schema, the description appropriately explains the return field 'structure' with details about its contents. It covers the input format (PEM), the tool's purpose, and a key safety guarantee. Minor gaps like error handling on malformed PEM are not addressed, but for a single-parameter parse tool, the description is sufficiently 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 description coverage is 100% for the single parameter, so the baseline is 3. The tool description does not add any parameter semantics beyond what the schema already provides; it only mentions the PEM format implicitly. No additional meaning or usage details are given.

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 specifies the verb '解析' (parse), the resource 'SM2 加密私钥 PEM 结构', and the outcome '返回 ASN.1 内部字段的 JSON 视图'. It clearly distinguishes this tool from sibling crypto operations by focusing on structural parsing rather than encryption/decryption/signing. The scope is well-defined and specific.

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 states the intended usage context ('用于调试与教学') and implies it is not for extracting private key values ('不会解出私钥值'). However, it does not explicitly name alternative tools for key extraction or decryption, which would earn a 5. Still, the context is clear and the exclusion is present.

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.