Skip to main content
Glama

Audit Json Web Token

audit_json_web_token

Audit a JSON Web Token offline to detect signature bypasses, weak HMAC keys, header injection, missing audience or issuer, time-claim issues, and sensitive claims, returning a bounded security report.

Instructions

Audit a JSON Web Token (JWT) offline for signature bypasses (alg=none), weak HMAC keys, header key-injection vectors (jku/x5u/jwk/x5c/kid/crit), missing audience/issuer, time-claim problems and sensitive claim names. Returns a typed, bounded security report.

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": "audit_json_web_token"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares the operation is offline (no network calls), names the concrete vulnerability classes checked, and states the output is a "typed, bounded security report," which signals a stable non-exploding response. It stops short of saying whether a caller-supplied key can be used or that the tool is strictly non-mutating.

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 sentences, no filler. The check list is front-loaded in the first sentence and the return-shape statement is held to the second, so the agent gets scope before contract.

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?

An output schema exists, so return values need not be explained, and the description correctly limits itself to scope plus a one-line characterization of the report. The only substantive gap is the token input format, which matters for a single-required-parameter tool.

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 description coverage is 0% and the single parameter is undocumented, so the description must compensate. It implies the input is a JWT but says nothing about format — raw compact serialization versus a "Bearer " prefixed header value, whitespace, or how many segments are expected — which is exactly where malformed-input failures occur.

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 gives a specific verb plus resource ("Audit a JSON Web Token (JWT)") and then enumerates the exact check families it performs — alg=none bypasses, weak HMAC keys, header key-injection vectors, audience/issuer, time claims, sensitive claim names. An agent can distinguish this from audit_cors and audit_security_headers purely from the text.

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 word "offline" is a real usage signal: it tells the agent this is static analysis of a token rather than a live verification against an IdP or JWKS endpoint. It does not explicitly state when to prefer an alternative or what to do when a live key is needed, but the sibling tools are unrelated so no exclusion is warranted.

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