Skip to main content
Glama

CipherHUB Cryptography Toolkit

cms_signed_verify

Read-only

[cms_signed] 验签 CMS SignedData(RFC 5652 §5),BER/DER 输入均容忍。 【算法】按消息声明还原 digestAlgorithm / signatureAlgorithm: RSA PKCS#1 v1.5、ECDSA、Ed25519、SHA1 消息均可验;rsassa_pss 按 RFC 8017 A.2.3 参数(hashFunc / MGF1 / saltLength)重建 padding;signedAttrs 验签体是 EXPLICIT SET OF DER 重编码(§5.4), BER 消息先规范形重编码再验。 【参数】

  • cms_in_hex:SignedData DER/BER 的十六进制(≤16MB)

  • data_in_hex:外部内容(仅 detached 消息必填;attached 消息 以消息内嵌内容为准,忽略此字段)

  • signer_certificate_in_pem:签名者证书 PEM(可选;留空则从 消息 certificates 集按 sid 定位——KMS 验 Nitro 证明文档同思路) 【输出】verified(bool)、reason、key_source(provided_pem / embedded_certificates)、detached、content_in_hex(attached 时 回显 eContent)、content_matches(外部内容与 messageDigest 一致)、 digest/signature 算法与 OID、ber_features、structure_tree。 【注意】验签语义 = 签名可验证 + messageDigest 与内容一致;证书 链有效性属 cert_verify 职责(warnings 注明);验签失败不返回 错误码,而是 verified=false + reason。

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

Input Schema

NameRequiredDescriptionDefault
cms_in_hexNoCMS 信封 DER/BER 编码的十六进制字符串(≤16MB;KMS 回包这类 BER 不定长编码可直接输入)
data_in_hexNo数据的十六进制字符串。RAW 模式为消息原文 Hex,DIGEST 模式为哈希摘要 Hex
signer_certificate_in_pemNo签名者证书的 PEM 文本(嵌入 certificates 集,验签方可按 sid 定位)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond readOnlyHint/openWorldHint, it discloses that signatures are reconstructed per declared algorithms (RSA PKCS#1 v1.5, ECDSA, Ed25519, SHA1), that RSASSA-PSS padding is rebuilt per RFC 8017 A.2.3, and that signedAttrs are verified over an EXPLICIT SET OF DER re-encoding after normalizing BER. It also states the failure contract — verified=false plus reason rather than an error code — and the 16MB input cap, which is exactly the behavioral context annotations cannot convey.

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 front-loaded with purpose and then organized under explicit 【算法】【参数】【输出】【注意】 headings, so nothing is buried. It is dense and longer than average, but nearly every line carries actionable detail rather than restating the name or schema.

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?

With no output schema, the description supplies the return contract itself: verified, reason, key_source, detached, content_in_hex, content_matches, algorithm/OID fields, ber_features and structure_tree. Combined with the algorithm support matrix and the failure-vs-error semantics, an agent has enough to call it and interpret the result 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?

Schema coverage is 100%, so parameters are already documented; the description still adds meaning the schema does not, notably that data_in_hex is ignored for attached messages because the embedded eContent takes precedence, and that an empty signer_certificate_in_pem triggers sid-based lookup in the certificates set. That clarification is valuable, since the schema's own data_in_hex text mentions RAW/DIGEST modes that are not relevant here.

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 opening line states a specific verb+resource with a standard citation: verify a CMS SignedData signature per RFC 5652 §5, tolerating both BER and DER input. It also names the boundary against a sibling by declaring that certificate-chain validity is cert_verify's responsibility, so an agent can separate it from cms_signed_sign and cert_verify without opening another schema.

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 explains when data_in_hex is mandatory (detached messages only; ignored for attached) and when signer_certificate_in_pem can be omitted (fall back to the embedded certificates set via sid). It also explicitly excludes certificate-chain validation, routing that to cert_verify. It lacks a direct 'use this rather than X' statement against cms_signed_sign, but the context is otherwise clear.

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.