Skip to main content
Glama

Decode a JWT

decode_jwt
Read-onlyIdempotent

Decode a signed JSON Web Token into its header, payload, and registered claims. Dates are absolute ISO timestamps. The signature is not checked.

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": "decode_jwt"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesA signed JWT, with or without a Bearer prefix. The signature is not verified.

Output Schema

NameRequiredDescriptionDefault
okYes
kindYes
errorYes
claimsYes
headerYes
payloadYes
signatureYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and closed-world behavior, so safety is covered. The description adds genuinely non-obvious behavior beyond them: the signature is not validated, and dates are rendered as absolute ISO timestamps, which tells the agent exactly what the decode returns. It stops short of saying what happens with malformed or expired tokens.

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?

Three short sentences, each carrying distinct information, with the primary action front-loaded. Nothing is redundant or padded.

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?

An output schema exists and the tool is a single-parameter pure read, so the description needs little else. It covers the output shape and the safety/verification caveat; only edge behavior (invalid or expired tokens) is left unaddressed.

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 and schema description coverage is 100%, so the schema already documents both the token format and the unverified-signature caveat. The description adds no parameter detail beyond that, which is the expected baseline when the schema does the work.

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 signed JSON Web Token') plus the exact output surface (header, payload, registered claims). That distinguishes it in practice from generic encoders like base64_codec, but no sibling is named explicitly, so it does not reach the top bar for sibling differentiation.

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 rather than stated: the tool is for inspecting a token's contents, and 'The signature is not checked' effectively warns that it is not a verification tool. There is no explicit statement of when to use it versus a sibling like base64_codec or an actual verification path.

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.