Skip to main content
Glama

ScorpTech x402 Tools

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. Returns JSON with: input, kty, crv, bits, jwk, jwks, thumbprint, thumbprintUri. Price: $0.002 USDC per successful call (x402, Base or 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.7/5.0
Behavior4/5

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

Goes well past the annotations: it declares a hard refusal of private keys, discloses the paid x402 model ($0.002 USDC, Base or Solana) and an alternate HTTPS endpoint, and lists weak-key warnings and supported curves. The only gap is that pricing/transport details crowd out anything about failure modes or rate limits.

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 and the return-field list is necessary because there is no output schema. The long comma-separated enumerations of algorithms and return keys are dense and could be tightened, but nothing is truly redundant.

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, the description carries the return contract itself (input, kty, crv, bits, jwk, jwks, thumbprint, thumbprintUri, plus fingerprints and x5t values) and covers payment, transport and the private-key restriction. An agent has everything needed to call this correctly.

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 already 100%, yet the description still adds meaning by enumerating which PEM subtypes (SPKI, PKCS#1, CERTIFICATE), base64 DER, OpenSSH lines and JWK/JWKS objects the 'key' parameter accepts, and by implying the RFC 7638 thumbprint default for 'kid'.

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?

Opens with a specific verb and resource ('Convert public keys between PEM, JWK and OpenSSH formats') and adds the identifier computation. The scope is unambiguous and cannot be confused with the numeric/unit conversion siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names three concrete downstream tasks (publish a JWKS, configure an OIDC / JWT verifier, pin a key) that tell an agent exactly when this tool is the right pick, and states the accepted input forms so the agent can pre-check its payload.

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