Skip to main content
Glama

P0: agent memory and utilities

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 exact paid x402 request for your input (GET /util/jwt-decode, $0.001 per call), with a link to the full schema; call that URL with an x402 or MPP client to get the data. Bad input is refused before any charge. With a P0 access key (header Authorization: Bearer p0k_…, buy one at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/buy?usd=5) this tool makes the paid call itself and returns the data, deducting the listed price.

Input Schema

NameRequiredDescriptionDefault
tokenYesJWT header.payload.signature

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, openWorld, so safety is covered. The description adds genuinely non-obvious behavior: a listed price ($0.001/call), that bad input is rejected before charging, and that supplying a P0 bearer key makes the tool perform the paid call itself. The defect is that it never clarifies which of the two modes actually runs by default, leaving a real ambiguity about what the call does.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and returned fields are front-loaded, which is good, but the second half crams in pricing, a documentation link, an MPP/x402 client instruction, an access-key purchase URL, and a fallback mode. The buy-keys URL and payment plumbing are bulky and partly promotional relative to the single decode operation.

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?

There is no output schema, so the description carries the return-value burden, and it does name the meaningful fields (header, payload, alg, kid, normalized times, expired flag). What is missing is the exact response envelope and what happens to the signature — whether it is validated, merely echoed, or omitted.

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 one parameter with 100% schema coverage ('JWT header.payload.signature', 65536 max length), so the schema already does the documentation work. The description contributes only the implied framing that no verification key is needed and that malformed tokens are cheaply rejected, which is marginal added meaning over the schema.

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 ('inspect a JWT without a key') and enumerates what comes back: decoded header and payload, alg, kid, iat/nbf/exp as ISO times, and expired-now status. This is clearly distinguishable from siblings like util_base64, util_hash, and util_json_validate, which do not decode 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 opening clause gives an explicit trigger condition ('when you need to inspect a JWT without a key') and the body explains the two invocation modes: raw x402 request vs. P0-key auto-call. It does not name an alternative tool or state when not to use it, so it stops short of the 5 bar.

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