Skip to main content
Glama

HALOWERK: Verify a JWT signature and claims, and name the classic token attacks explicitly

jwt_verify
Read-only

Verify a JWT signature and claims, detecting classic token attacks including alg none, HMAC key confusion, unlimited lifetime, and missing audience.

Instructions

Verify a JWT signature and claims, and name the classic token attacks explicitly: alg none, HMAC confusion, unbounded lifetime, missing audience.

Kostenpflichtig: 0.002 USDC je Aufruf. Bezahlt per x402 auf Base, ohne Konto. Hoechstens 0.002 USDC je Aufruf.

Decodes a JWT and checks it in two layers. Structure and claims: expiry, not-before and issued-at against the current time with the clock skew you allow, issuer and audience against the values you expect, and the token lifetime. Signature: HMAC with a shared secret, or RSA, RSA-PSS and ECDSA against a PEM key or a JWKS you point at, with the kid matched to the right key. On top of that it names the attacks that live in this exact spot: alg set to none, an HMAC algorithm where an asymmetric key is expected which is the classic key-confusion path, a token with no expiry at all, and an audience that does not name you. Without a key or secret the token is decoded and its claims judged, and the signature is reported as unverified rather than assumed good. Preis 0.002 USDC je Aufruf, Abrechnung über x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesThe JWT in compact form.
secretNoShared secret for HS256/384/512.
jwks_urlNoJWKS endpoint; the key is picked by kid.
public_key_pemNoPEM public key for RS/PS/ES algorithms.
expected_issuerNoIssuer the token must carry.
expected_audienceNoAudience the token must name.
clock_skew_secondsNoTolerance for exp and nbf.
max_lifetime_secondsNoFlag tokens valid for longer than this.
Behavior5/5

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

Beyond annotations (readOnlyHint=true, destructiveHint=false), the description adds valuable behavioral disclosures: the two-layer check (structure/claims and signature), the per-call cost of 0.002 USDC via x402, and the behavior when no key is provided. It also explains that it reports unverified signatures rather than failing or assuming success. No contradiction with annotations.

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

Conciseness2/5

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

The description is overly verbose and redundant, repeating the pricing information three times (Kostenpflichtig, Hoechstens, and final Preis lines). While the purpose is front-loaded, the repeated German pricing paragraphs and lengthy explanation detract from overall conciseness and structure.

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?

Given 8 parameters and no output schema, the description is fairly complete: it specifies claim checks (exp, nbf, iat, issuer, audience, token lifetime), signature algorithms (HMAC, RSA, RSA-PSS, ECDSA), JWKS handling, and the no-key case. It does not explicitly describe the return format, but the level of behavioral detail largely compensates.

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?

The input schema already describes all 8 parameters (100% coverage), so the baseline is 3. The description's references to 'clock skew you allow' and 'kid matched to the right key' are helpful but largely paraphrase the schema descriptions. It adds minimal new semantic meaning 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?

The description states a specific verb+resource: 'Verify a JWT signature and claims' and explicitly names the classic token attacks (alg none, HMAC confusion, unbounded lifetime, missing audience). This clearly separates it from siblings like cve_check or webhook_signature.

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 description gives clear context for when to use this tool (any JWT verification task) and even adds a nuance: without a key, it decodes and judges claims but reports the signature as unverified rather than assuming good. However, it does not mention alternatives or exclusions compared to sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/halowerk/halowerk-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server