Skip to main content
Glama

Jwt Decode

jwt_decode
Read-only

Decodes a JWT (up to 16 KB): header, payload, registered claims as ISO dates, expired and not-yet-valid flags, algorithm and signature length. With jwksUrl (public https) the signature is checked with WebCrypto for RS, PS and ES algorithms against the matching key. 'none' is never accepted; HMAC needs the secret. Tokens are secrets: this tool does not store or log them. Price: $0.002 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

Input Schema

NameRequiredDescriptionDefault
tokenYesThe JWT, three base64url parts separated by dots (up to 16 KB)
jwksUrlNoPublic https URL of the JWKS to verify with (optional)

Output Schema

NameRequiredDescriptionDefault
kidNo
typeNo
claimsNo
headerNo
sourceNo
expiredNo
payloadNo
verifiedNo
algorithmNo
checkedAtNo
notYetValidNo
signatureBytesNo
verifiedReasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly and openWorld annotations, the description discloses size limits, which claims are normalized to ISO dates, validity flags, supported verification algorithms, security handling of secrets, and pricing behavior. It also clarifies that tokens are not stored or logged and failed calls are not charged. These details materially help an agent understand side effects, cost, and constraints.

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?

The description is front-loaded with the core decode behavior and then adds verification, security, and pricing details in a compact paragraph. Every sentence adds operational value, and there is no redundant restatement of the name or schema.

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 the output schema exists, the description does not need to enumerate return fields in detail, yet it still names the key result components. Combined with full schema coverage and annotations, it provides enough context for correct invocation, including limits, verification behavior, secret handling, and cost model.

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 the schema already documents both parameters. The description still adds meaningful semantics: jwksUrl must be a public https URL and triggers WebCrypto signature verification against the matching key for specific algorithm families. It also reinforces that token is secret and capped at 16 KB.

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?

The description states a specific verb and resource: it decodes a JWT and returns header, payload, registered claims, validity flags, algorithm, and signature length. It also bounds the input at 16 KB, so the agent knows exactly what operation is being performed. No sibling tool covers JWT decoding, making the purpose unambiguous.

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?

The description gives clear conditional usage for the optional verification path: with jwksUrl, signatures are checked using WebCrypto for RS, PS, and ES algorithms. It also notes that 'none' is never accepted and HMAC needs the secret. It does not explicitly state when to prefer this tool over alternatives, but there is no direct sibling alternative for JWT decoding.

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