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. Price: $0.005 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/jwt-decode

Input Schema

TableJSON 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.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the supported signature algorithms, the SSRF-safe fetch behavior, the 'never trusts alg none' policy, the specific security findings produced, and the x402 payment model ($0.005 USDC per successful call) plus an HTTPS endpoint. These are behaviors an agent can't infer from readOnlyHint/openWorldHint alone.

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?

Front-loads the core action and outputs before the optional verification path and pricing details. It is dense but nearly every clause carries operational information; the single-block structure is slightly heavy for the amount of content, but there is little waste.

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?

No output schema exists, and the description compensates by enumerating the returned fields (header, claims, alg/kid, time-claim status, aud/iss checks, security findings). Combined with payment/auth requirements and the POST-only contract, 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.

Parameters4/5

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

Schema coverage is 100%, so a baseline of 3 applies, but the description adds relational meaning the schema can't: `discover` only activates when no `jwks_url` is given and requires an https `iss`, and `leeway` governs the exp/nbf/iat status reporting. That cross-parameter behavior justifies a bump above baseline.

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 and resource ('Decode a JWT (JWS or JWE header)') and immediately enumerates the outputs: header, claims, alg/kid, exp/nbf/iat status, aud/iss checks, and security findings. This is clearly distinguishable from sibling decoders like evm_selector_decode or hash_encode, which operate on different artifacts.

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?

Gives explicit invocation constraints ('POST only, token in the JSON body, never in a URL') and states the two paths for signature verification: a supplied jwks_url, or OpenID discovery from an https iss when no jwks_url is present. It doesn't name an alternative tool or spell out when-not to use it, but no close sibling exists to route against.

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