Skip to main content
Glama

Razi Dev Utilities

decode_jwt

Decode a JWT's header and payload for inspection. Returns JSON { header, payload, signatureVerified, note, expiresAt, isExpired } — structured objects, not a rendered table. The signature is NEVER verified: that needs the issuer's key, which this service does not have, so signatureVerified is always false and the claims must be treated as untrusted, attacker-controllable input. Expiry is computed from the exp claim and is null when the token has none. Use decode_base64 for a bare Base64 string; this tool additionally splits the three segments and handles base64url padding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesThe full JWT: three base64url segments separated by dots (header.payload.signature). Surrounding whitespace is trimmed; a 'Bearer ' prefix is not stripped and will fail. Anything without exactly three segments is rejected.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and delivers: it discloses that signatures are NEVER verified, signatureVerified is always false, claims must be treated as untrusted attacker-controlled input, expiry is derived from exp and null when absent, and output is structured JSON objects rather than a table. This goes well beyond the schema.

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 front-loaded with the core purpose and return shape, then covers critical security caveats and alternatives. Every sentence adds necessary information; no fluff or repetition of schema content.

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 having no output schema, the description fully documents the return object fields and their semantics. It also covers failure-prone edge cases (Bearer prefix, segment count), security implications, and the sibling tool route, making it complete for an agent to invoke 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?

Schema coverage is 100% and already describes the token format well. The description adds extra meaning by explaining that it handles base64url padding, splits segments, and contrasting with decode_base64, providing context the schema alone does not convey. Slight deduction because most parameter-level detail is already in 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?

The description opens with a specific verb and resource: 'Decode a JWT's header and payload for inspection.' It clearly differentiates itself from decode_base64 by noting it splits the three segments and handles base64url padding, so an agent can distinguish it from its sibling without ambiguity.

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 names the alternative tool decode_base64 and states the condition for choosing it ('for a bare Base64 string'), contrasting with this tool's additional JWT-specific behavior. It also gives practical usage constraints such as the Bearer prefix not being stripped and the three-segment requirement.

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