Skip to main content
Glama

CipherHUB Cryptography Toolkit

rsa_verify

Read-only

[rsa] RSA 公钥验签。 【参数】

  • rsa_public_key_in_pem:PEM 格式公钥

  • data_in_hex:原始数据 Hex

  • signature_in_hex:签名 Hex

  • rsa_sign_padding_mode:必须与签名时一致

  • rsa_sign_raw_data_mode:必须与签名时一致 【输出】verified(bool,True=验签通过)。

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

Input Schema

NameRequiredDescriptionDefault
data_in_hexNo数据的十六进制字符串。RAW 模式为消息原文 Hex,DIGEST 模式为哈希摘要 Hex
signature_in_hexNo签名的十六进制字符串
rsa_public_key_in_pemNoRSA 公钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)
rsa_sign_padding_modeNoRSA 签名填充模式,可选值:RSA_SIGN_PKCS1_V1_5_SHA1 / SHA224 / SHA256 / SHA384 / SHA512 或 RSA_SIGN_PSS_SHA1 / SHA224 / SHA256 / SHA384 / SHA512
rsa_sign_raw_data_modeNoTrue=对原文签名(服务端内部先哈希),False=data_in_hex 已是哈希摘要的 Hex

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / data_in_hex / description
      Added value: +"数据的十六进制字符串。RAW 模式为消息原文 Hex,DIGEST 模式为哈希摘要 Hex"
    • addedInput schema / properties / rsa_public_key_in_pem / description
      Added value: +"RSA 公钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)"
    • addedInput schema / properties / rsa_sign_padding_mode / description
      Added value: +"RSA 签名填充模式,可选值:RSA_SIGN_PKCS1_V1_5_SHA1 / SHA224 / SHA256 / SHA384 / SHA512 或 RSA_SIGN_PSS_SHA1 / SHA224 / SHA256 / SHA384 / SHA512"
    • addedInput schema / properties / rsa_sign_padding_mode / enum
      Added value: +[
      +  "RSA_SIGN_PKCS1_V1_5_SHA1",
      +  "RSA_SIGN_PKCS1_V1_5_SHA224",
      +  "RSA_SIGN_PKCS1_V1_5_SHA256",
      +  "RSA_SIGN_PKCS1_V1_5_SHA384",
      +  "RSA_SIGN_PKCS1_V1_5_SHA512",
      +  "RSA_SIGN_PSS_SHA1",
      +  "RSA_SIGN_PSS_SHA224",
      +  "RSA_SIGN_PSS_SHA256",
      +  "RSA_SIGN_PSS_SHA384",
      +  "RSA_SIGN_PSS_SHA512"
      +]
    • addedInput schema / properties / rsa_sign_raw_data_mode / description
      Added value: +"True=对原文签名(服务端内部先哈希),False=data_in_hex 已是哈希摘要的 Hex"
    • addedInput schema / properties / signature_in_hex / description
      Added value: +"签名的十六进制字符串"
  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, consistent with a pure local verification computation, and nothing in the text contradicts them. The description adds real value beyond the annotations by stating the return contract ("verified(bool,True=验签通过)"), since there is no output schema. It does not say what happens on an invalid signature (return False vs. raise), which is the one remaining behavioral gap.

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 structure is clean and front-loaded: a one-line purpose followed by a 【参数】block and a 【输出】block. Most of the parameter block duplicates the schema, but it is compact enough not to be wasteful, and the output note earns its place.

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?

For a five-parameter, all-optional cryptographic verification tool with no output schema, the definition covers what to feed in, the mode-consistency precondition, and what comes back. Only the error/failure behavior for a bad signature is unaddressed, which is a minor gap for a read-only computation.

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%, so the baseline is 3. The description does add a little meaning: it restates each parameter's identity and, importantly, states that both the padding mode and the raw-data mode must match the original signing parameters, which the schema does not say. Enum values and the RAW-vs-DIGEST distinction are left to the schema.

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 opens with a specific verb and resource: "RSA 公钥验签" (verify a signature with an RSA public key), which distinguishes it from rsa_sign and from the ECC/SM2/ML-DSA verify siblings by key type. It does not explicitly name a sibling to defer to, but the operation itself (public-key signature verification) is unambiguous.

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 spelled out: the agent can infer it verifies a signature over data_in_hex. The one genuinely useful guidance sentence is that rsa_sign_padding_mode and rsa_sign_raw_data_mode "必须与签名时一致" (must match how the signature was produced), which is an operational precondition. There is no explicit when-not or routing to alternatives such as cert_verify or ecc_key_verify.

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.