Skip to main content
Glama

MAD Synapse · Utils

JWT decoder

jwt_decode
Read-onlyIdempotent

Decode a JSON Web Token's header and claims, show issued/expiry times in plain dates and whether it has expired — optionally verify an HS256/384/512 signature with a secret. Decoding does not need the key. Never paste production secrets into third-party tools you do not trust; verification here is local and nothing is stored or logged. Price: free. Errors: returns isError with a message for invalid input or an upstream failure (not charged).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesThe JWT (three base64url parts). The signature is not verified.
secretNooptional HMAC secret to verify HS* signatures

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
headerNo
expiredNo
payloadNo
issued_atNo
signatureNo
expires_atNo
not_beforeNo
seconds_leftNo
alg_none_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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/non-destructive safety, so the bar is lower, and the description adds real context beyond them: verification is local, nothing is stored or logged, pricing is free, and errors return isError without charge. It stops short of full disclosure (e.g. no rate-limit or output-shape notes), but the additions are genuinely useful.

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?

Purpose and the core capability are front-loaded, and each subsequent sentence (key optionality, secret-handling caution, pricing, error behavior) carries distinct information. It is slightly long for a two-parameter tool, but nothing is 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?

An output schema exists, so return values need not be explained in the description. The description covers purpose, key semantics, security posture, pricing, and error behavior, leaving little an agent needs to invoke it correctly.

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%, so both parameters are already documented in the schema, establishing the baseline of 3. The description adds the specific HMAC algorithm names (HS256/384/512) and clarifies the key is unnecessary for decoding, which is marginal added value 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 ('Decode a JSON Web Token's header and claims') and specifies exactly what it surfaces (issued/expiry dates, expiry status) plus an optional signature-verification capability. No sibling tool overlaps with JWT decoding, so it is unambiguously distinguishable.

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?

Gives clear operating context: 'Decoding does not need the key', clarifying that the secret is only required for optional HS256/384/512 verification. No named alternatives exist among siblings, but it never states when one would reach for this tool rather than a generic decoder, keeping it below a 5.

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