Skip to main content
Glama

Decode Jwt

decode_jwt
Read-onlyIdempotent

Decode a JSON Web Token (keyless, offline): returns the header and payload JSON plus a summary of the standard claims (iss, sub, aud, exp/iat/nbf as ISO dates, and whether it is expired). NOTE: this decodes but does NOT verify the signature, a decoded token is not a verified/trusted token.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
    },
    "name": "decode_jwt"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesA JWT (header.payload.signature).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
      +  }
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds meaningfully more: that the operation is offline and keyless, what is returned, how timestamps are rendered (ISO dates) and how expiry is reported. The explicit caveat that decoding is not verification is exactly the security-relevant behavioral context an agent needs before acting on the output.

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?

Two compact segments: the capability/scope statement first, then the verification caveat. Every clause carries information — output contents, timestamp handling, expiry reporting, and the trust warning — with no filler.

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 one-parameter, read-only utility with no output schema, the definition supplies everything needed: what comes back, how claims are formatted, and the critical limitation on trusting the result. No dependency on missing structured fields remains.

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 a single required parameter and schema description coverage is 100%, with the schema already stating the expected "header.payload.signature" format and providing a full example. The description adds no syntax, size, or format guidance beyond that, which is acceptable at this coverage level but not additive.

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 JSON Web Token") and immediately scopes it (keyless, offline). It also enumerates the concrete outputs (header, payload, standard-claim summary), so an agent knows exactly what this tool produces without opening the schema.

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?

It establishes the usage context clearly (offline, keyless, inspection-oriented) and effectively defines a when-not-appropriate boundary via the note that the result is not verified or trusted. It stops short of naming an alternative tool for signature verification, so no explicit routing is given.

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.