Skip to main content
Glama

CipherHUB Cryptography Toolkit

sm9_verify

Read-only

[sm9_ibc] SM9 标识验签(GM/T 0044)。验签方只需主公钥与签名者标识:输入 master_public_key_in_pem(key_kind=Sign 的主公钥)、identity(签名者标识)、data_in_hex(消息原文 hex)、signature_in_hex(DER 签名,恰 104 字节 = 208 hex 字符)。verified=false 是成功响应(签名或标识不匹配),仅输入格式非法才返回错误码 'SM9 verify failed'。

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

Input Schema

NameRequiredDescriptionDefault
identityNoSM9 用户标识(原始字符串,如邮箱/账号,1-63 UTF-8 字节;签名/加密/解密均与该标识绑定)
data_in_hexNo数据的十六进制字符串。RAW 模式为消息原文 Hex,DIGEST 模式为哈希摘要 Hex
signature_in_hexNo签名的十六进制字符串
master_public_key_in_pemNoSM9 主公钥的 PEM 文本(明文形态,验签/加密侧使用;Sign/Enc 两类主密钥的公钥标签不同)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

The annotations only declare readOnlyHint and openWorldHint, so the description must carry the result-semantics burden, and it does: 'verified=false 是成功响应' means a mismatch is a normal result, not a failure, and only malformed input produces the 'SM9 verify failed' error code. It also adds a hard input constraint (a DER signature must be exactly 104 bytes / 208 hex characters), which is non-obvious behavior an agent would otherwise get wrong.

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 text is front-loaded with purpose and standard, followed by required inputs and per-parameter constraints, then result semantics. Each parenthetical carries a concrete constraint or key-type qualification rather than filler, so no sentence can be dropped.

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?

With four params, no output schema, and sparse annotations, the definition covers what the caller must supply, the signature-length constraint, and how to read verified=false versus an error. It stops short of naming the exact response fields or error-code envelope, which is a minor but real gap given the absence of an output schema.

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?

The input schema already documents all four parameters at 100% coverage, so 3 is the baseline; the description adds value beyond the schema by tying master_public_key_in_pem to a key_kind=Sign public key and by specifying the 104-byte/208-hex-character DER length for signature_in_hex. It also clarifies that data_in_hex is the raw message even though the schema mentions a DIGEST-mode alternative.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The text states a specific verb and resource ('SM9 标识验签 / SM9 identity signature verification') plus the governing standard GM/T 0044, and it pins the mode as IBC with a Sign-kind master public key, so it is clearly distinct from the signing and encryption siblings. It never names an alternative tool (e.g. sm2_verify or sm9_sign) or an explicit routing rule, which keeps it just short of a 5.

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 text gives clear operating context: the verifier needs only the master public key and the signer's identity, and master_public_key_in_pem must be the key_kind=Sign public key. It does not state when to prefer a different verify tool or when this tool is inappropriate, so guidance exists but without exclusions.

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.