Skip to main content
Glama

Generate or convert a key pair

generate_keypair
Read-onlyIdempotent

Generate an RSA, EC, or Ed25519 key pair as PEM and JWK, or convert between PEM and JWK. The private key is returned in the result and is not stored. The page in the browser generates keys locally and does not send them.

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

Input Schema

NameRequiredDescriptionDefault
algNoES256
jwkNoJWK JSON to convert. Required for to_pem.
pemNoSPKI or PKCS8 PEM to convert. Required for to_jwk.
actionNogenerate
modulusLengthNo

Output Schema

NameRequiredDescriptionDefault
algYes
jwksYes
publicJwkYes
publicPemYes
privateJwkYes
privatePemYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, openWorldHint=false, and idempotentHint=true. The description adds meaningful behavioral context beyond that: the private key is returned in the result, is not stored, and browser-side generation is local and does not send keys. It does not contradict the read-only annotation because generation is described as non-persistent computation.

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 description is short and front-loads the main capability before adding privacy details. The final sentence about browser-local generation is somewhat tangential to direct MCP invocation, but the overall structure is efficient and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has five parameters, an output schema, and annotations, so the definition does not need to explain return values or safety. Still, with only 40% schema description coverage, the description leaves notable gaps around action selection, conversion inputs, and modulusLength, making it only minimally complete for a tool with multiple modes.

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 description coverage is low at 40%, so the description needs to compensate. It adds conceptual meaning for the algorithm and output/input formats by naming RSA, EC, Ed25519, PEM, and JWK, but it does not explain the action parameter values, the required jwk/pem conditions, or the modulusLength parameter.

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?

The description states a specific verb and resource: generating RSA, EC, or Ed25519 key pairs and converting between PEM and JWK. It is clear enough to distinguish this from generic conversion tools, but it does not explicitly differentiate itself from sibling tools such as generate_password or convert_data_format.

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 implies two usage modes, generation and conversion, by saying it can 'Generate... or convert between PEM and JWK.' However, it does not explicitly state when to choose each action, what inputs are required for each mode, or when an agent should avoid this tool in favor of a sibling.

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.