Skip to main content
Glama

CipherHUB Cryptography Toolkit

generate_rsa

Read-only

[rsa] 生成 RSA 密钥对。 【参数】

  • key_size:2048 / 3072 / 4096(位)

  • private_key_password:可选,设置后私钥 PEM 用 AES-256-CBC 加密保护 【输出】public_key_in_pem、private_key_in_pem、key_size。 【后续操作】公钥用于 rsa_encryption / rsa_verify,私钥用于 rsa_decryption / rsa_sign。

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_rsa"
  }
}

Input Schema

NameRequiredDescriptionDefault
key_sizeNoRSA 密钥位数,可选值:2048 / 3072 / 4096
private_key_passwordNo私钥的加密密码(原始字符串,非编码格式),可选

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / key_size / description
      Added value: +"RSA 密钥位数,可选值:2048 / 3072 / 4096"
    • addedInput schema / properties / key_size / enum
      Added value: +[
      +  "2048",
      +  "3072",
      +  "4096"
      +]
    • addedInput schema / properties / private_key_password / description
      Added value: +"私钥的加密密码(原始字符串,非编码格式),可选"
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With annotations already declaring readOnlyHint=true and openWorldHint=false, the description adds useful behavior beyond the safety profile: the private key PEM is AES-256-CBC encrypted when a password is supplied, and the output fields are named. It does not discuss entropy or error behavior, but for a key-generation utility this is solid added context.

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 organized into clear 【参数】【输出】【后续操作】 sections and front-loads the core purpose. Every sentence carries useful 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 two-parameter key-generation tool with annotations and no output schema, the description covers purpose, parameters, outputs, and downstream usage. It leaves minor gaps such as key format details and error conditions, but nothing essential for correct invocation is missing.

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 coverage is 100%, so the enum values and optionality of key_size and private_key_password are already documented in the schema. The description mainly restates those facts and adds the AES-256-CBC encryption detail, which is helpful but does not substantially deepen parameter semantics beyond the structured fields.

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 states a specific verb and resource: "生成 RSA 密钥对" (generate an RSA key pair). The [rsa] prefix and RSA-specific wording distinguish it from sibling key-generation tools such as generate_ecc and generate_sm2.

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?

It clearly explains downstream usage: the public key feeds rsa_encryption / rsa_verify and the private key feeds rsa_decryption / rsa_sign. It does not explicitly state when to choose RSA over ECC or SM2, but the context is clear enough for an agent to route correctly.

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.