Skip to main content
Glama

wop_gen_key_pair

Generates RSA2048 or SM2 key pairs for WOP integration, returning the distributable public key while writing the private key only to a local 0600 file.

Instructions

生成 WOP 对接所需的非对称密钥对(RSA2048 / SM2)。

安全纪律:私钥只写入本地 0600 文件,不会出现在返回值或对话中;
返回的 publicKey 为分发契约编码(RSA:SPKI DER Base64;
SM2:未压缩点 04‖X‖Y Base64),可直接上报平台。

Args:
    algorithm: str - "RSA2048"(别名 "RSA")或 "SM2",默认 "RSA2048"

Returns:
    Dict 包含 algorithm / publicKey / privateKeyFile(路径) / message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
algorithmNoRSA2048

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the security discipline (private key written only to local 0600 file, never in return values or conversation), the exact encoding contracts for publicKey per algorithm, and the return shape. This is rich behavioral context an agent could not infer otherwise.

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?

Well-structured with a purpose line, a labeled security block, and explicit Args/Returns sections. Slight redundancy with both prose and Args/Returns sections, but every sentence carries meaning.

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?

For a 1-param, no-annotation mutation tool, the description fully covers the algorithm semantics, key-writing side effects, encoding contracts, and return fields. An output schema exists, so return structure needn't be over-explained, and it isn't.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It documents the single 'algorithm' parameter fully: accepted values 'RSA2048' (alias 'RSA') or 'SM2', and the default 'RSA2048' – including an alias not visible in the schema.

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?

States a specific verb+resource: generating an asymmetric key pair for WOP onboarding, with the exact algorithms named (RSA2048/SM2). Clearly distinguishable from siblings (overview, api_detail, link_detail), which are all read inspection tools.

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?

Implies usage via 'WOP 对接所需' (needed for WOP integration) but gives no explicit when-to-use conditions, prerequisites, or alternatives. No sibling routing, though siblings are conceptually unrelated so routing is less critical.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.