Skip to main content
Glama

CipherHUB Cryptography Toolkit

generate_ecc

Read-only

[ecc] 生成 ECC 密钥对。 【曲线】ECC_SECP_256R1 / ECC_SECP_384R1 / ECC_SECP_521R1 / ECC_SECP256K1 / ECC_ED25519(仅签名)/ ECC_X25519(仅 ECDH)。 【参数】

  • curve:曲线名

  • private_key_password:可选,私钥 PEM 加密保护 【输出】public_key_in_pem、private_key_in_pem、curve。 【能力矩阵】

  • SECP* / SECP256K1 → 签名 + 验签 + ECDH

  • ED25519 → 仅签名/验签(EdDSA)

  • X25519 → 仅 ECDH 密钥协商

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

Input Schema

NameRequiredDescriptionDefault
curveNoECC 曲线名,可选值:ECC_SECP_256R1 / ECC_SECP_384R1 / ECC_SECP_521R1 / ECC_SECP256K1 / ECC_ED25519 / ECC_X25519ECC_SECP_256R1
private_key_passwordNo私钥的加密密码(原始字符串,非编码格式),可选

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / curve / description
      Added value: +"ECC 曲线名,可选值:ECC_SECP_256R1 / ECC_SECP_384R1 / ECC_SECP_521R1 / ECC_SECP256K1 / ECC_ED25519 / ECC_X25519"
    • addedInput schema / properties / curve / enum
      Added value: +[
      +  "ECC_SECP_256R1",
      +  "ECC_SECP_384R1",
      +  "ECC_SECP_521R1",
      +  "ECC_SECP256K1",
      +  "ECC_ED25519",
      +  "ECC_X25519"
      +]
    • addedInput schema / properties / private_key_password / description
      Added value: +"私钥的加密密码(原始字符串,非编码格式),可选"
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only supply readOnlyHint and openWorldHint, so the description does the real work: it lists the returned fields, discloses that ED25519/X25519 are operation-restricted, and explains that private_key_password encrypts the private key PEM. It adds useful behavioral context beyond the annotations, falling short of 5 only for saying nothing about entropy/side effects of key material creation.

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?

Labeled sections (曲线 / 参数 / 输出 / 能力矩阵) make it easy to scan and the action is front-loaded in the first line. The curve list is partly duplicative of the schema enum and the 曲线 block and 能力矩阵 block overlap slightly, but nothing is padded.

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?

There is no output schema, yet the definition enumerates the return payload (public_key_in_pem, private_key_in_pem, curve), and both optional parameters are covered with their defaults known from the schema. For a two-parameter key-generation tool this leaves no operational question open.

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, and the description earns a point above that by annotating each curve's cryptographic capability in the 能力矩阵 — meaning the schema enum does not carry. The private_key_password entry is restated clearly as optional PEM encryption.

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?

State a specific verb and resource with scope: '生成 ECC 密钥对' plus the full curve catalogue and a capability matrix. The agent knows exactly what is produced, though the definition never contrasts itself with sibling generators like generate_rsa or generate_sm2, so cross-tool differentiation is left to the name.

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 能力矩阵 tells the agent which curve to pick for which downstream operation (SECP* → sign/verify + ECDH, ED25519 → signing only, X25519 → ECDH only), which is genuine selection guidance. What is missing is any statement of when to choose this generator versus the RSA/SM2/SM9 siblings, so there is context but no explicit exclusion.

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.