Skip to main content
Glama

jwt-lint

JWT lint: alg none, crit, key-URL headers, expiry, audience (decode only) — Decodes a compact JWT (never verifies the signature) and checks it against RFC 7519 and RFC 8725 for an agent about to trust or forward it: alg none or missing, crit and key-supplying headers (jku, x5u, jwk), kid injection shape, duplicate claims, and exp, nbf, iat against a caller-supplied time, plus optional expected algorithms, issuer and audience. Without asOf the time claims are not judged an

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "token": "<token>"
    },
    "name": "jwt-lint"
  }
}

Input Schema

NameRequiredDescriptionDefault
asOfNoReference instant, epoch seconds. Required to judge exp/nbf/iat.
tokenYesCompact JWS: header.payload.signature.
requireExpNoDefault true: a token without exp fails.
expectedAlgsNoAllow-list of algorithms; any other alg fails.
leewaySecondsNoClock-skew allowance, default 0.
expectedIssuerNo
expectedAudienceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose the critical behavior: signature is never verified, decoding is pure inspection, and time claims are only judged when asOf is supplied. It also surfaces the non-obvious default that a token without exp fails (requireExp default true). It does not describe the shape of the findings it returns or ordering/severity of failures, which is the remaining gap for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the check list, which is good, but it is a single dense run-on sentence with heavy abbreviation ("crit", "kid injection shape") and it is truncated mid-clause: "Without asOf the time claims are not judged an". That cut-off sentence leaves a dangling, incomplete thought in the definition itself.

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?

For a 7-parameter, no-annotation, no-output-schema lint tool, the description covers the substantive checks (alg none, crit/jku/x5u/jwk headers, duplicate claims, exp/nbf/iat, expected algs/issuer/audience) and the asOf gating. It falls short only on return-value shape and on the truncated final sentence, which likely carried an additional caveat the caller now cannot read.

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 71%, so the schema already documents most parameters including defaults for leewaySeconds and requireExp. The description adds real meaning for asOf ("caller-supplied time", and that omitting it disables time-claim judging) and flags expectedAlgs/expectedIssuer/expectedAudience as optional checks, but leewaySeconds and the token format constraints are left entirely to 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 chain ("Decodes a compact JWT ... and checks it against RFC 7519 and RFC 8725") plus the resource and an explicit negative scope: "never verifies the signature". That negative scope cleanly separates it from the sibling jwt-verify without needing to open either 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?

Gives a clear usage context: "for an agent about to trust or forward it", which tells the caller the decision this tool informs. It stops short of naming jwt-verify as the alternative for actual signature verification, so the routing is implied by the "decode only" note rather than stated as an explicit when/when-not pair.

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