Skip to main content
Glama

jwt_decode

Decode a JWT header and payload without verifying its signature, flag alg=none, and convert exp/iat/nbf timestamps to readable dates with expiration status.

Instructions

Decode a JWT header and payload without verifying the signature.

Flags alg=none, shows exp/iat/nbf as human dates and whether it is expired.

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
tokenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does the important part well: it discloses the security-relevant behavior that the signature is NOT verified, that alg=none is flagged, and that temporal claims are rendered as dates with an expiry verdict. It stops short of covering failure modes or the exact response shape.

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 short sentences, front-loaded with the core operation and the no-verification caveat, followed by the specific extras surfaced. Nothing is padded or repeated from the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/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 utility with no output schema, the description is nearly sufficient: it conveys the operation, its safety boundary, and the notable derived outputs. The remaining gap is the expected input format and any error behavior.

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 description coverage is 0% with one parameter named 'token', which is largely self-explanatory. The description adds no guidance on whether the raw JWT string, a 'Bearer ' prefixed value, or a full header is expected, so it does not fully compensate for the missing schema documentation.

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 names a specific verb and resource ('Decode a JWT header and payload') and immediately scopes it with 'without verifying the signature', so an agent knows exactly what the tool returns and what it deliberately does not do.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the operation itself: decode a token to inspect its claims. There is no explicit statement of when to prefer this tool, no note on what to do when signature verification is required, and no mention of error behavior for malformed input.

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