Skip to main content
Glama

JWT parser

jwt_decode
Read-onlyIdempotent

Decode a JSON Web Token header and payload and explain its time claims to inspect token contents without verifying the signature.

Instructions

Decode a JSON Web Token header and payload and explain its time claims. Does not verify the signature. (Same as IT-Tools /jwt-parser.)

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 a "Bearer " prefix

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and closed-world behavior, so the description only needs to add context. It does: the explicit 'does not verify the signature' caveat is the single most important behavioral fact for an agent handling untrusted tokens, and the mention of explaining time claims signals that exp/iat/nbf are rendered into human-readable form rather than left as raw epoch values.

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?

Two short sentences, front-loaded with the core action, followed by the key caveat. The trailing IT-Tools provenance note is minor padding but arguably useful for agents cross-referencing equivalent tooling.

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 one-parameter, no-output-schema decode tool, this covers action, limits, and the nature of the returned analysis. The only missing piece an agent might want is whether malformed tokens error out versus returning partial output, which is a minor gap.

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 coverage is 100% with a single required parameter, and the schema already documents the 'Bearer ' prefix tolerance, so the description adds no parameter meaning beyond it. Baseline 3 applies because the schema fully carries this burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 header and payload, plus explain time claims. The negative scope statement 'Does not verify the signature' further pins down what the tool is. It does not name a sibling to differentiate from, but the read-only decode framing is unambiguous against generation/hashing siblings such as generate_token or hash_text.

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?

There is an implicit when-not-to-use signal in 'Does not verify the signature', which tells an agent this is not a validation tool. However, it never says when to reach for this versus json_format or a signature-verifying flow, and there are no stated prerequisites (e.g., token must be well-formed).

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