Skip to main content
Glama

CipherHUB Cryptography Toolkit

sm2_public_key_to_hex

Read-only

[sm2] 将 SM2 PEM 公钥转换为裸 Hex 编码(未压缩点,04 || X || Y)。返回字段:public_key_in_hex(130 个 hex 字符,65 字节)。

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

Input Schema

NameRequiredDescriptionDefault
public_key_in_pemNoSM2 公钥的 PEM 文本(含 BEGIN/END PUBLIC KEY 头尾)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / public_key_in_pem / description
      Added value: +"SM2 公钥的 PEM 文本(含 BEGIN/END PUBLIC KEY 头尾)"
  2. First observed

TDQS

A3.7/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, so the safety profile is covered. The description adds useful behavior beyond that: the exact output encoding (uncompressed point, 04 || X || Y), the returned field name, and its length (130 hex chars / 65 bytes). It does not discuss error behavior for malformed PEM, but the added format detail is substantial.

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?

Two short sentences with zero waste: the transformation is front-loaded, followed by the precise return format. 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?

For a single-parameter, read-only conversion tool, the definition covers input encoding, output encoding, output field name, and output size. No output schema exists, but the description supplies the return shape itself, so nothing essential is missing.

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% and the single parameter public_key_in_pem is fully documented in the schema, including the BEGIN/END header requirement. The description reinforces that the input is an SM2 PEM public key but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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 description states a specific verb and resource: convert an SM2 PEM public key into raw hex (uncompressed point, 04 || X || Y). The [sm2] prefix and the explicit input/output encodings make it clearly distinct from sibling tools such as sm2_private_key_structure_parse or generate_sm2. It stops short of naming an alternative, so it is clear but not sibling-differentiating in the strongest sense.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance, no prerequisites, and no mention of alternatives. The only usage signal is implicit in the purpose (you have a PEM public key and need hex), which an agent must infer.

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.