Skip to main content
Glama

CipherHUB Cryptography Toolkit

ecc_key_sign

Read-only

[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 不可用于签名。

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

Input 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.1/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 safety is covered; the description adds real context beyond that: hash_algorithm is silently ignored under EdDSA, a password is only needed when the private key is encrypted, raw mode hashes internally while digest mode skips hashing, and curve support is bounded. It stops short of stating error behavior or that the return value is purely local output, but the value-add over annotations 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The labeled blocks (参数 / 输出 / 曲线限制) front-load the operation and then the constraints, and every line carries information. There is mild redundancy: the parameter block largely restates descriptions already present in the schema, costing a little length without new meaning.

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 five parameters and no required fields, an agent might invoke it with nothing set, and the description never says which inputs are mandatory or what the defaults (Sha512, raw mode true) mean in practice. Against that, it compensates for the absent output schema by naming the three returned fields, so the definition is close to complete for this complexity.

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 already 100%, so the baseline is 3; the description still earns a bump by adding conditional semantics the schema omits, notably that hash_algorithm is ignored for EdDSA and that ecc_private_key_password is only supplied when the key is encrypted. It does not clarify why no parameter is required or what the defaults do, which is a gap the schema alone also leaves open.

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 names a specific verb and resource ('ECC 私钥签名') and immediately disambiguates the algorithm family: ECDSA for SECP* curves, EdDSA for ED25519. Combined with the curve restriction note (X25519 cannot sign), an agent can tell this apart from sibling signers such as rsa_sign, sm2_sign, or ecc_key_exchange without opening any schema.

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 by key type and curve rather than stated explicitly; the description never names an alternative tool (e.g. what to use for X25519) or says when to prefer this over ecc_key_verify or the CMS/COSE signers. The one genuine exclusion, 'X25519 不可用于签名', and the raw-vs-digest fork provide partial routing guidance, but the agent must infer the rest.

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.