Skip to main content
Glama

jwt_decode

Decode a JSON Web Token's header and payload without verifying the signature, and report issued-at, not-before and expiry as dates and whether it has expired. The token is not stored. Do not use the result to trust a token. Use to debug auth flows. Side effects: none on any outside system (it only reads or computes), but each successful call costs $0.001 in USDC on Base or another supported network, paid with x402, or the same amount in prepaid card credits when the request carries an API key from /credits. That payment is why the tool is not marked read-only or idempotent: repeating a call charges again. Failed calls are never charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesThe JWT

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?

Annotations are unusual (readOnlyHint=false with no destruction), and the description explains exactly why: per-call payment via x402/USDC or prepaid credits means repeat calls are re-charged, hence not idempotent. It also discloses that the token is not stored and that failed calls are never charged. This is context the annotations cannot convey on their own.

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 and output are front-loaded in the first sentence, and the warning to not trust the result follows immediately. The payment sentence is long and dense (network, protocol, credit path) but earns its place by justifying the annotation choices.

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 steps in to enumerate the return fields (issued-at, not-before, expiry, expired), and it covers the non-obvious billing behavior and non-storage guarantee. An agent has everything needed to call and interpret 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?

Only one parameter ('token'), and schema description coverage is 100%, so the schema already carries the meaning. The description adds no syntax, format, or accepted-algorithm detail beyond 'The JWT' in the schema, making this a baseline case.

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 precise verb and resource ('Decode a JSON Web Token's header and payload without verifying the signature') plus the concrete outputs (issued-at, not-before, expiry, expired flag). This clearly distinguishes it from siblings like base64_decode, which would not surface JWT claims or expiry.

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?

Explicit when-to-use ('Use to debug auth flows') and an explicit when-not/warning ('Do not use the result to trust a token'). The boundary against token-verification use cases is stated outright rather than left to inference.

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