Skip to main content
Glama

CipherHUB Cryptography Toolkit

ecc_key_sign

[ecc] ECC 私钥签名(SECP* 用 ECDSA,ED25519 用 EdDSA)。 【参数】

  • ecc_private_key_in_pem:PEM 私钥

  • data_in_hex:待签数据 Hex

  • sign_raw_data_mode:True=对原文签名(内部先哈希),False=data_in_hex 已是摘要

  • hash_algorithm:Sha256/Sha384/Sha512 等(EdDSA 忽略此参数)

  • ecc_private_key_password:若私钥加密则传入 【输出】signature_in_hex、signature_length、curve_name。 【曲线限制】X25519 不可用于签名。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_in_hexNo数据的十六进制字符串。RAW 模式为消息原文 Hex,DIGEST 模式为哈希摘要 Hex
hash_algorithmNo哈希算法名称,可选值:Sha1 / Sha224 / Sha256 / Sha384 / Sha512(ECC 不支持 Sm3)Sha512
sign_raw_data_modeNoTrue=对原文签名(服务端内部先哈希),False=data_in_hex 已是哈希摘要的 Hex
ecc_private_key_in_pemNoECC 私钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)
ecc_private_key_passwordNoECC 私钥的加密密码(原始字符串,非编码格式)

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 / ecc_private_key_in_pem / description
      Added value: +"ECC 私钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)"
    • addedInput schema / properties / ecc_private_key_password / description
      Added value: +"ECC 私钥的加密密码(原始字符串,非编码格式)"
    • addedInput schema / properties / hash_algorithm / description
      Added value: +"哈希算法名称,可选值:Sha1 / Sha224 / Sha256 / Sha384 / Sha512(ECC 不支持 Sm3)"
    • addedInput schema / properties / hash_algorithm / enum
      Added value: +[
      +  "Sha1",
      +  "Sha224",
      +  "Sha256",
      +  "Sha384",
      +  "Sha512"
      +]
    • addedInput schema / properties / sign_raw_data_mode / description
      Added value: +"True=对原文签名(服务端内部先哈希),False=data_in_hex 已是哈希摘要的 Hex"
  2. First observed

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 explains the algorithm selection, the raw/digest mode behavior, and the curve limitation, going beyond the schema. It also lists output fields. This is substantial behavioral context, though it omits error handling or response format details.

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 well-organized with clear sections (parameters, output, limitation), uses bullet points for readability, and is front-loaded with the core purpose. Every sentence adds relevant information without redundancy.

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 signing tool, the description covers the essential aspects: algorithm behavior, parameter semantics, output fields, and a critical limitation. It does not mention error conditions or response formatting, but given the absence of an output schema, the listed output fields are helpful. Overall, it is adequately complete for an agent to call it 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 the baseline is 3. The description adds value by clarifying that hash_algorithm is ignored for EdDSA, that ecc_private_key_password is only needed if the key is encrypted, and the effect of sign_raw_data_mode. These details complement the schema descriptions.

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 clearly states 'ECC 私钥签名' (ECC private key signing) and specifies the algorithm variants (ECDSA for SECP*, EdDSA for ED25519). This distinguishes it from sibling tools like ecc_key_verify, ecc_key_exchange, and generate_ecc, making its purpose 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?

The description provides curve-specific behavior (EdDSA ignores hash_algorithm) and a limitation (X25519 not allowed), but does not explicitly mention when to choose this tool over alternative signing tools like rsa_sign or sm2_sign. Usage guidance is implied rather than directly stated.

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.