Skip to main content
Glama
x402-preflight-mcp

x402-preflight-mcp

by animus3d

jwt_oidc_security_linter

Audits JWT headers, claims, JWKS, and OIDC discovery configs to detect alg:none, HS256/RS256 confusion, excessive TTL, missing iss/aud/jti, and insecure redirect URIs.

Instructions

[x402 $0.03 USDC on Base/Solana] Audits JWT headers/claims, JWKS, and OIDC discovery configs for alg:none, HS256/RS256 confusion, excessive TTL, missing iss/aud/jti, and insecure redirect URIs.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "jwt_oidc_security_linter"
  }
}

Input Schema

NameRequiredDescriptionDefault
jwksNoJWKS document
tokenNoCompact JWT string (header.payload.sig)
claimsNoDecoded JWT claims
headerNoDecoded JWT header
nowEpochNoOptional Unix epoch seconds
oidcConfigNoOIDC discovery document
_paymentSignatureNoOptional base64-encoded x402 v2 payment-signature header (overrides X402_PAYMENT_SIGNATURE env var).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/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. It does add real value by disclosing the paid x402 pricing ($0.03 USDC on Base/Solana) and the exact audit rule set, but it says nothing about whether the operation is read-only/non-mutating, whether tokens are stored or logged, what the findings output looks like, or how the payment signature is handled beyond the schema's own note.

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

Conciseness4/5

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

A single sentence that front-loads the payment tag and then the purpose, with zero filler. The bracketed pricing prefix is dense but informative rather than redundant; the only minor cost is that it competes with the purpose for the opening position.

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?

With seven optional parameters, nested objects, no annotations, and no output schema, the description should clarify minimum viable input and what a result contains. It fully covers what is checked but leaves the agent guessing about required inputs and return shape for a linter whose entire value is its findings list.

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 100%, so the baseline is 3. The description adds some semantic framing by pairing the audit checks with the artifact types the parameters represent (header/claims vs JWKS vs OIDC config), but it adds nothing for nowEpoch or _paymentSignature beyond what the schema already documents.

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 a specific verb (audits) and precise resources (JWT headers/claims, JWKS, OIDC discovery configs), then enumerates the exact vulnerability classes checked: alg:none, HS256/RS256 confusion, excessive TTL, missing iss/aud/jti, insecure redirect URIs. No sibling in the list overlaps this domain, so an agent can select it from the name plus one sentence.

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

Usage Guidelines3/5

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

Usage is only implied: the agent infers it should pass a token/claims/jwks/oidcConfig when it wants a security audit. There is no statement of when to prefer this over alternatives, no note that all seven parameters are optional (so what happens with partial or empty input is unstated), and no prerequisites such as token decoding requirements.

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