Skip to main content
Glama

Authorize an x402 payment

check_payment
Read-onlyIdempotent

Decide whether a specific x402 payment should go through: returns allow true/false with reasons. Checks the endpoint's trust verdict, that the amount is within your cap and not above the monitored price, and that the payTo wallet matches the one we've observed (catches swapped or hijacked wallets). Use it right before paying, with the amount, payTo, and network from the endpoint's 402 quote; pay only when allow is true. Use check_endpoint instead if you only want an endpoint's grade without a quote in hand. Read-only and free; it doesn't make or block the payment itself, your agent does. If allow is false, report the reasons to the user rather than paying. For per-agent keys, enforced spend limits, and signed receipts, teams use the paid /v1/authorize API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFull URL of the x402 endpoint you are about to pay, including path
payToNoWallet address from the endpoint's 402 quote
amountNoAmount about to be paid, atomic units (USDC has 6 decimals: 10000 = $0.01)
networkNoNetwork from the quote, e.g. eip155:8453
maxAmountNoYour hard cap for this payment in atomic units (USDC: 1000000 = $1). Payments above it are denied.
allowCautionNofalse = deny endpoints with a caution verdict too, not just avoid (default true)
requireVerifiedNotrue = only allow endpoints that delivered on a real test payment (default false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
allowYesPay only when true
gradeNo
notesNo
scoreNo
reasonsYesWhy it was allowed or denied
verdictNoproceed | caution | avoid | free | insufficient_data
deliveryNo
forTeamsNoShort note about team plans (per-agent keys, spend limits, audit trail)
observedNoThe latest payment quote our monitor saw
monitoredYesWhether the endpoint is in the monitored catalog
payToModeNo
reviewableNoDenied only for reasons a person may approve
declaredPayToNoPayout wallets the seller declared itself
walletUnconfirmedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover read-only/idempotent safety, and the description adds value beyond them: what specifically triggers denial (trust verdict, cap, monitored price, payTo mismatch), that it neither makes nor blocks the payment, and that it is free. It even flags the paid /v1/authorize API for teams needing spend limits and receipts.

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?

Front-loaded with the decision and return shape, then routing and edge-case handling in compact sentences. The closing sentence promoting the paid /v1/authorize API is the only part that reads as upsell rather than operating guidance.

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?

An output schema exists so return values need not be detailed, yet the description still names the allow-flag contract and what to do with denials. For a read-only decision tool with 100% schema coverage, nothing an agent needs to call it correctly is missing.

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% and all seven parameters carry descriptions including defaults and atomic-unit examples, so the schema does the heavy lifting. The description reinforces which parameters come from the 402 quote but adds no format or default detail beyond the schema, matching the baseline 3.

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?

States a specific verb ('Decide whether a specific x402 payment should go through') plus the concrete return contract ('allow true/false with reasons'). It explicitly separates itself from the sibling check_endpoint, so an agent can route without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('right before paying, with the amount, payTo, and network from the quote'), an alternative ('check_endpoint if you only want an endpoint's grade without a quote'), and a behavioral rule for the negative case ('If allow is false, report the reasons to the user rather than paying').

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.