Skip to main content
Glama

jwt-verify

JWT signature and claims verification — Verifies a JWS-compact JWT: signature over base64url(header).base64url(payload) with Web Crypto under the exact algorithm in the token's alg header (HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512, EdDSA). Refuses 'none' unconditionally and rejects any alg not in the caller's allowedAlgorithms. Validates exp/nbf with a configurable clock-skew tolerance (default 60s), iss equality, a

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>",
      "key": "<key>",
      "allowedAlgorithms": "<allowedAlgorithms>"
    },
    "name": "jwt-verify"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
tokenYesThe JWS-compact JWT: three base64url parts joined by '.'.
issuerNoRequire payload.iss to equal this.
nowIsoNoOverride 'now' for deterministic tests.
audienceNoRequire payload.aud to include this.
toleranceSecondsNoClock-skew tolerance for exp/nbf. Default 60s.
allowedAlgorithmsYesAlgorithms the caller accepts; verification fails if the header's alg is not here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/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 discloses substantial behavior: exact Web Crypto signature verification, unconditional refusal of 'none', enforcement of caller-supplied allowedAlgorithms, and exp/nbf checking with configurable skew. However, the description is truncated and does not state the return contract or error behavior beyond algorithm rejection.

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 description is front-loaded and dense but ends abruptly at 'iss equality, a', leaving the sentence incomplete and cutting off likely audience validation details. The truncated ending hurts structure and completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 7-parameter verification tool with no output schema, the description covers core cryptographic behavior well but is truncated and omits the return value or success/failure representation. It also lacks explicit guidance on error handling beyond unsupported algorithms.

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 86%, so the schema already documents most parameters. The description adds some context about how allowedAlgorithms and the alg header interact and mentions clock-skew tolerance, but it does not add meaning beyond the schema for most fields and omits the audience parameter due to truncation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: verifying a JWS-compact JWT signature and claims. It lists the supported algorithms and validation scope, making the purpose clear, but it does not explicitly distinguish this tool from the sibling jwt-lint.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool versus alternatives such as jwt-lint or webhook-verify. Usage is implied by the verification behavior, but no when-not conditions or prerequisites are stated.

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