Skip to main content
Glama

ScorpTech x402 Tools

Jwt Decode

jwt_decode
Read-onlyIdempotent

Decode a JWT (JWS or JWE header), POST only (token in the JSON body, never in a URL): header, claims, alg/kid, exp/nbf/iat status with leeway, aud/iss checks, and security findings (alg none, HMAC alg-confusion risk, jku/x5u/jwk header keys, missing exp, odd kid). Optionally verifies the signature against a JWKS URL you supply, or one discovered from the token's https iss via OpenID discovery (fetched SSRF-safely): RS256/384/512, PS256/384/512, ES256/384/512, ES256K and EdDSA. Never trusts alg none. Returns JSON with: format, header, payload, alg, times, checks, verification, findings. Price: $0.005 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/jwt-decode

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": {
      "token": "<token>"
    },
    "name": "jwt_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
audNoExpected audience to check
issNoExpected issuer to check
tokenYesCompact JWT in the JSON body (a "Bearer " prefix is stripped). Alias: jwt
leewayNoClock skew allowance in seconds, 0-600 (default 60)
discoverNoVerify via OpenID discovery from the https iss claim when no jwks_url is given
jwks_urlNoOptional JWKS (or single JWK) URL to verify the signature

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive, and open-world behavior, yet the description adds substantial context beyond them: the POST-only transport constraint, SSRF-safe JWKS fetching, an explicit 'never trusts alg none' guarantee, the supported algorithm whitelist, and per-call pricing. These are operationally decisive details not captured by any structured field.

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?

Front-loaded with the core action and constrained transport, then layered with security findings, verification options, return keys, and pricing in a single dense paragraph. Every clause carries operational weight, including the alternate HTTPS endpoint, with no filler.

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?

Given six parameters and no output schema, the description enumerates the returned JSON keys (format, header, payload, alg, times, checks, verification, findings) and discloses cost and the equivalent HTTPS endpoint. Nothing needed to call or interpret the result 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 input schema already documents token, aud, iss, leeway, discover, and jwks_url, including the "Bearer " prefix stripping and the 0-600 leeway range. The description confirms the precedence of jwks_url over discovery from the iss claim but adds little beyond what the schema already states, so the baseline of 3 applies.

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 ("Decode a JWT (JWS or JWE header)") and enumerates the exact outputs: header, claims, alg/kid, time claims with leeway, aud/iss checks, security findings. This is clearly distinguishable from the signing sibling jwt_sign.

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?

Explicitly mandates POST with the token in the JSON body and never in a URL, and explains the two verification routes: supply jwks_url or fall back to OpenID discovery from the https iss claim. It lacks an explicit 'when not to use' or a contrast with jwt_sign, but the call conditions are otherwise unambiguous.

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