Skip to main content
Glama

JWT decoder

jwt_decode
Read-only

Decode a JWT header and claims into readable dates, seconds left, and expiry or unsigned-token warnings. Use it to inspect tokens without verifying signatures.

Instructions

Decode a JSON Web Token's header and claims, with issued/expiry times in plain dates, seconds left, and warnings for expired, not-yet-valid or unsigned (alg none) tokens. Decoding only; the signature isn't verified. Costs $0.001 per call.

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
tokenYesThe JWT (with or without 'Bearer ').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Beyond readOnlyHint=true, the description discloses the non-obvious behavioral trait that signature verification does NOT occur, plus that warnings are emitted for expired, not-yet-valid and 'alg: none' tokens. It also surfaces the per-call cost of $0.001, which annotations never carry. It does not say whether the call fails or succeeds on an expired token, a minor remaining gap.

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?

Two sentences, front-loaded with the core action, and every clause earns its place: outputs, the verification caveat, edge-case warnings, and price. No filler or restatement of the title.

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?

For a single-parameter read-only tool with no output schema, the description fully anticipates what the caller needs: what is decoded, how times are rendered, what warnings may appear, the verification limitation, and the cost. Nothing required to call it correctly 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?

With a single parameter and 100% schema description coverage, the schema already explains that the token may be supplied with or without 'Bearer '. The description adds no format, length, or encoding guidance beyond that, so it sits at the baseline for fully documented schemas.

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's header and claims) and immediately enumerates the derived output (plain dates, seconds left, warnings), so an agent knows exactly what this returns without opening a schema. It is clearly distinct from any sibling in the provided list, none of which deal with tokens.

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 clause 'Decoding only; the signature isn't verified' is an effective when-not-to-use signal, steering agents away from treating the result as an authenticity check. It stops short of naming an alternative verification tool, but the negative boundary is explicit and unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.