Skip to main content
Glama

Jwk Convert

jwk_convert
Read-onlyIdempotent

Convert public keys between PEM, JWK and OpenSSH formats and compute their identifiers — what an agent needs to publish a JWKS, configure an OIDC / JWT verifier or pin a key. Accepts SPKI or PKCS#1 PEM, X.509 certificates (PEM or base64 DER), OpenSSH public keys, a JWK or a whole JWKS. Returns the public JWK (RSA, EC P-256 / P-384 / P-521 / secp256k1, OKP Ed25519 / Ed448 / X25519 / X448), RFC 7638 thumbprint (and RFC 9278 thumbprint URI), SPKI PEM, OpenSSH line with its SHA256 fingerprint, the pin-sha256 SPKI hash, x5t / x5t#S256 for certificates, suggested JWS algorithms and weak-key warnings. Public keys only: private keys are refused, never processed. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/jwk-convert

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "key": "<key>"
    },
    "name": "jwk_convert"
  }
}

Input Schema

NameRequiredDescriptionDefault
algNoJWS / JWE algorithm to set on the JWK, e.g. RS256, ES256, EdDSA
keyYesPEM (PUBLIC KEY, RSA PUBLIC KEY or CERTIFICATE), base64 DER, an OpenSSH public key line, or a JWK / JWKS (as an object or JSON string)
kidNoKey ID to set (default: keep the JWK kid, else the RFC 7638 thumbprint)
useNoPublic key use to set on the JWK

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses behavior an agent could not otherwise know: private keys are refused and never processed, the response is a public JWK only, and each successful call costs $0.002 USDC via x402 on Solana with a documented HTTPS fallback endpoint. Nothing here contradicts the annotations.

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?

Purpose is front-loaded in the first clause, followed by inputs, outputs, security constraint, and price. The long return-value enumeration is justified because there is no output schema, though the sentence runs dense enough that scanning suffers slightly.

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?

With no output schema and a complex multi-format transformation, the description compensates by enumerating supported curves/alg families and every returned artifact (JWK, RFC 7638 thumbprint, SPKI PEM, OpenSSH line with SHA256 fingerprint, pin-sha256, x5t, suggested JWS algs, weak-key warnings). Combined with the private-key refusal and pricing note, an agent has everything needed to call it correctly.

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 100%, so the schema already documents key, alg, kid and use in detail. The description adds no parameter-level meaning beyond noting the accepted input format families for 'key', which the schema also covers. Baseline 3 is appropriate when the schema carries this load.

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 (convert) and resource (public keys) plus the exact formats handled (PEM, JWK, OpenSSH) and the derived identifiers it computes. An agent can distinguish this immediately from siblings like ssh_key_info, x509_decode, pgp_key_info or jwt_decode, which inspect rather than convert keys.

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?

Names concrete use cases that select this tool: publishing a JWKS, configuring an OIDC/JWT verifier, pinning a key. It also enumerates the accepted input encodings, so the agent knows whether its payload qualifies. It stops short of explicitly naming alternatives to avoid for those tasks, which keeps it from a 5.

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.

Resources