Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYes
secretNooptional HMAC secret to verify HS* signatures

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

The annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false. The description adds significant behavioral context: it states that decoding does not need the key, verification is local, nothing is stored or logged, and it shows issued/expiry times in plain dates and expiry status. It also mentions the price is free. This goes well beyond the annotations without contradicting them.

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?

The description is concise and front-loaded: it opens with the primary action, then details the optional verification, security note, and price. Every sentence adds value with no redundant phrases. It is well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite lacking an output schema, the description clearly explains what the tool returns (header, claims, dates, expiry status) and its optional verification behavior. It also covers security considerations and pricing. For a read-only, idempotent tool with only two parameters, this is complete and sufficient for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 50% coverage: token has no description, secret has a brief description. The description clarifies the purpose of the secret parameter (optional HMAC secret for HS* verification) and explicitly states that decoding does not need it. This adds meaning beyond the schema. The token parameter is self-explanatory given the tool's purpose, so the description adequately compensates for the coverage gap.

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 description clearly states the tool decodes a JWT's header and claims, and optionally verifies an HS256/384/512 signature with a secret. It specifies the resource (JWT) and the actions (decode, verify, show dates, check expiry). This distinguishes it from sibling tools like hash_encode or json_schema_validate, which serve different purposes.

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 description provides context on when to use the tool: for decoding JWTs and optionally verifying signatures locally. It notes that decoding does not require the key and that verification is local, which helps agents decide if this is appropriate. It does not explicitly name alternative tools or exclusion criteria, but the unique purpose among siblings makes the usage context clear.

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