Skip to main content
Glama

Payment policy check

wever_payment-policy-check
Read-only

Agent preflight: check one x402 payment challenge against your spending policy before you pay. Input challenge (the 402 response body, one payment requirements object or the base64 PAYMENT-REQUIRED header, version 1 or 2) and policy (per_call_cap and daily_cap in whole units of the asset, optional spent_today, allowed_networks, allowed_assets, optional recipient_allowlist and asset_decimals). The signed report gives a pay or refuse verdict, the reason for every failed rule (challenge schema, network, asset, recipient, per-call cap, daily cap and a stated authorization window), and the amount, asset, network, recipient and expiry restated from the challenge itself. It evaluates the challenge only and never pays. POST /api/payment-policy-check. Reads only the material in the call: no page fetch, no registry or chain lookup, no counterparty contact, and no payment signed, submitted or moved. Paid URL: 0.10 USDC per call on Base via x402 exact, with the shared 10 signed-wallet free calls per rolling 30 days. Bind X-Wever-Wallet-Proof to the exact JSON arguments and the tool route. Returns a report with an Ed25519 signed receipt. Contract: /api/agent-preflight-contract. Human page: https://weverlabs.com/preflight/.

Input Schema

NameRequiredDescriptionDefault
labelNoOptional name for the payment, recorded in the report.
policyYes
challengeYesThe x402 payment challenge as received: the 402 response body (x402Version, resource and accepts), one payment requirements object from its accepts list, or the base64 PAYMENT-REQUIRED header value. Version 1 and version 2 challenges are read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior3/5

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

With readOnlyHint=true, openWorldHint=false and destructiveHint=false already declared, the description still adds real substance: 'Reads only the material in the call: no page fetch, no registry or chain lookup, no counterparty contact, and no payment signed, submitted or moved,' plus pricing (0.10 USDC, 10 free calls per rolling 30 days) and the X-Wever-Wallet-Proof binding requirement. However, many of these facts restate what the annotations already guarantee, and the detail is mixed together with access/billing logistics rather than clearly separated.

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?

Purpose and the never-pays guarantee are front-loaded, and the rule list is densified efficiently. It does run long for one paragraph and carries access metadata (paid URL, contract path, human page URL) that competes with the core explanation.

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

Completeness5/5

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

It states accepted input formats, the rules evaluated, the verdict and per-rule failure reasons, the fields restated in the report, the Ed25519 signed receipt, and that no payment moves. Given there is no output schema, that level of return-value disclosure is what an agent needs to call it confidently.

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 67% and the schema descriptions already explain whole units, defaults, CAIP-2 network identifiers and USDC shorthand. The description enumerates the policy fields and the three accepted challenge forms, but mostly mirrors the schema rather than adding semantics the schema lacks, so the baseline 3 fits.

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 first sentence gives a specific verb and resource ('check one x402 payment challenge against your spending policy') plus the moment of use ('before you pay'), and the later 'It evaluates the challenge only and never pays' separates it from payment-executing siblings such as wever_x402-payment-gateway or wever_payout-execute.

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?

Usage context is explicit: it is an 'Agent preflight' to run before paying, and it explicitly does not pay. It never names the sibling tool an agent should call next to actually pay, so the alternative is implied rather than 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.