Skip to main content
Glama

decode_jwt

Decode a JWT to view its header and payload. Inspect claims such as expiry, subject, and issuer for debugging authentication issues.

Instructions

Decode a JWT (JSON Web Token) without signature verification.

Parses and decodes the header and payload sections of a JWT for inspection.
Useful for debugging authentication issues, inspecting claim values, or
checking expiry. Does NOT verify the signature — do not use this to make
security decisions about whether a token should be trusted.

Args:
    token: JWT string (three base64url-encoded sections separated by dots).
           Both compact and bearer format ('Bearer eyJ...') are accepted.

Returns:
    header: Decoded JWT header (alg, typ, kid).
    payload: Decoded JWT payload (all claims as-is).
    is_expired (bool): True if the 'exp' claim is in the past.
    expires_at: Expiry datetime string if 'exp' claim present (may be null).
    issued_at: Issue datetime string if 'iat' claim present (may be null).
    subject: The 'sub' claim if present (typically a user ID).
    issuer: The 'iss' claim if present.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYes
Behavior5/5

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

No annotations provided, so description fully carries burden. It clearly states it does NOT verify signature, lists accepted input formats (compact and bearer), and details all return fields including is_expired, expires_at, etc.

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?

Well-structured with 'Args' and 'Returns' sections. The security warning is a single sentence. Every sentence provides value without redundancy.

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?

For a simple tool with one parameter and no output schema, the description fully covers input specification, return fields, and crucial behavioral details (no verification). It is complete and self-contained.

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

Parameters5/5

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

Only one parameter (token) with 0% schema description coverage. Description compensates fully by explaining token format: 'JWT string (three base64url-encoded sections separated by dots). Both compact and bearer format are accepted.' This adds crucial meaning beyond the raw 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?

Description clearly states 'Decode a JWT without signature verification' and explains it parses header and payload. It effectively distinguishes the tool from unrelated siblings by specifying its exact function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: debugging authentication issues, inspecting claims, checking expiry. Also provides important when-not: 'Do NOT use this to make security decisions about whether a token should be trusted.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ForeverTools/kiprio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server