Skip to main content
Glama

Util JWT decode

util_jwt_decode
Read-onlyIdempotent

Use when you need to inspect a JWT without a key: decoded header and payload, alg, kid, iat/nbf/exp as ISO times and whether it is expired now. Returns the paid x402 request for your input (GET /util/jwt-decode, $0.001 per call; schema linked). Call that URL with an x402 or MPP client to get the data. Bad input is refused before any charge. Decode only: the signature is not verified. First call each day returns the data itself, free; later calls return the paid request.

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

Input Schema

NameRequiredDescriptionDefault
tokenYesJWT header.payload.signature

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive. The description adds substantial context beyond them: cost of $0.001 per call, bad input refused before any charge, signature not verified, and the first-call-free-then-paid-request behavior. The one gap is that it does not say how the agent detects whether a given response is data or a payment request.

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?

The purpose and return fields are front-loaded, and every sentence carries operational information (price, client requirement, validation, free tier). The pricing and x402 mechanics are slightly compressed into parentheticals, which makes the middle sentences denser than ideal, but there is no filler.

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 tool with no output schema, the description covers the return shape, cost model, error behavior, and the security caveat that the signature is not verified. The only ambiguity is the dual return mode, which is disclosed but not explained in terms of how to distinguish the two cases.

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?

There is a single required parameter with 100% schema coverage, so the baseline is 3. The description adds only marginal meaning ("without a key", "signature is not verified"), which informs what the token may be but does not describe format or edge cases beyond the schema's 'header.payload.signature' hint.

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 first sentence states a specific verb and resource (inspect/decode a JWT without a key) and enumerates the exact fields returned: header, payload, alg, kid, iat/nbf/exp as ISO times, and expiry status. This clearly separates it from sibling utilities like util_base64 or util_hash, which handle different encodings.

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?

It gives a clear triggering condition ("Use when you need to inspect a JWT without a key") and the operational prerequisite (call the returned URL with an x402 or MPP client). It does not name an alternative tool or state when not to use it, but the usage context is unambiguous.

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