Skip to main content
Glama

Verificar JWT (HMAC)

jwt-verify-hmac
Read-onlyIdempotent

Comprueba sin conexión un JWT firmado con HMAC (HS256/384/512): compara la firma en tiempo constante, rechaza «none» y cambios de algoritmo, y evalúa exp y nbf en un instante dado (as_of). Cuándo: hay que leer, construir o revisar con exactitud una URL, una cabecera HTTP, un token, una versión, un rango de IP, un documento HTML o Markdown o un archivo para agentes. No para: decodificar cabecera y payload de un JWT SIN verificar la firma (jwt-decode). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Checks an HMAC-signed JWT (HS256, HS384, HS512) offline: compares the signature in constant time, refuses "none" and algorithm swaps, and evaluates exp and nbf at a given instant (as_of) with optional leeway. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
as_ofNoReference instant ISO 8601 for exp/nbf (string; optional; up to 40 chars).
tokenYesJWT (string; required; up to 16384 chars).
secretYesHMAC secret (string; required; at least 1 chars; up to 4096 chars).
algorithmsNoAccepted algorithms (array of string; optional; default ["HS256"]; at least 1 items; up to 3 items).
leeway_secondsNoClock leeway (integer; optional; default 0; min 0; max 3600).

Output Schema

NameRequiredDescriptionDefault
validNo
reasonNo
payloadNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / secret / examples
      Added value: +[
      +  "x"
      +]
    • addedInput schema / properties / token / examples
      Added value: +[
      +  "eyJhbGciOiJub25lIn0.eyJhIjoxfQ."
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Checks an HMAC-signed JWT (HS256, HS384, HS512) offline: compares the signature in constant time, refuses \"none\" and algorithm swaps, and evaluates exp and nbf at a given instant (as_of) with optional leeway. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. Not for: decoding a JWT header and payload WITHOUT verifying the signature, so the claims must not be trusted (jwt-decode). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare read-only and idempotent, but the description goes well beyond them: constant-time comparison, rejection of 'none' and algorithm substitution, exp/nbf evaluation with optional leeway, no network, determinism, and hard limits (64 KB input, 1 s, 1 MB result). That is exactly the extra behavioral context the annotations do not carry.

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?

The core JWT content is front-loaded and useful, but the definition is duplicated bilingually and repeats the full text again inside inputSchema.description, plus the generic 'Cuándo' sentence lists unrelated artifacts. Roughly half the text does not earn its place.

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?

With an output schema present and rich annotations, the description covers the remaining gaps: limits, offline/deterministic behavior and the security caveats around algorithm swaps. The only shortfall is the imprecise usage clause, which slightly muddies when this tool applies.

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 100% and every property already documents type, bounds and defaults, so the baseline is 3. The description only adds meaning to as_of (the reference instant for exp/nbf) and leeway indirectly; it says nothing extra about algorithms or the token/secret bounds beyond 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?

Names the exact verb and resource ('comprueba sin conexión un JWT firmado con HMAC'), enumerates supported algorithms (HS256/384/512), and explicitly contrasts with the jwt-decode sibling. An agent can distinguish it from jwt-decode and jwt-sign-hmac without opening any 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?

The 'No para:' clause is a precise exclusion naming the alternative tool (jwt-decode) and the reason (unverified claims must not be trusted). However, the 'Cuándo:' sentence is generic boilerplate about URLs, IP ranges, HTML/Markdown documents that has nothing to do with JWT verification, so the positive routing signal is weak.

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