Skip to main content
Glama

Test purchase, without paying

test_purchase
Read-onlyIdempotent

WALK THE WHOLE PURCHASE OF AN x402 ENDPOINT WITHOUT PAYING, in the order a buyer actually asks the questions, stopping at the first one that objects. Every other tool here answers ONE question about one subject; the losses live between them. Five steps: is the endpoint there, what does it charge RIGHT NOW, does the seller’s own catalogue entry agree with what it just said, does the record say anything against paying that payee under a published policy, and — the step that only exists because this is a rehearsal — is the price still the one the decision was made on, re-read a moment later. A quote that moved between the decision and the signature would authorise something nobody decided on. THE VERDICT HAS THREE STATES AND cannot-tell IS NOT would-proceed: an unanswered question is never rounded up to a passed one. quotedRaw is what the endpoint said, in the asset’s smallest unit, and quotedUsd is NULL unless the catalogue carries both halves of the same token’s pair to scale it — nothing in a payment-requirements document names the decimals, and a figure scaled by a guessed exponent is a hundred-fold error waiting to be quoted. We knock only on endpoints already in the x402 catalogue we read, at most one live handshake a minute per resource, because fetching a URL because a request named it would make us a prober-for-hire pointed at somebody else’s host. Nothing is signed and nothing is spent. FREE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fillNoValues for the slots the SELLER’s own catalogue URL declares, e.g. `{"doi": "10.1000/xyz"}` for a resource listed as `…?doi={doi}`. A SMALL PART of the catalogue is templates rather than plain addresses — `askedWithUnfilled` on the answer names the slots for the endpoint in front of you — and without this we knock with `{doi}` where a value belongs and answer a question nobody asked. ONLY declared slots are accepted: a name the template does not contain is REFUSED rather than ignored, because a parameter silently dropped would let you read the answer as being about the call you meant to make. Values are percent-encoded and the filled URL is verified to reach the same origin and path shape as the catalogue entry, so a value can never choose the host — not even a slot the seller put in their own hostname. A filled rehearsal is ALWAYS a live knock, so inside the one-a-minute cooldown it answers 429 rather than serving back the reading of the unfilled question; and it is NOT written to the endpoint history, because two different questions in one run series would look like a price that moved.
policyNoA policy version or slug to decide under. Defaults to conservative-v1.
resourceYesThe http(s) endpoint to rehearse buying. It must be one the x402 catalogue already holds; `list_x402_endpoints` finds it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
liveNoWhether the handshake happened just now or is the stored reading from within the last minute. A stored reading is a weaker claim and this says which it is.
saysYesThe verdict in one sentence: where a careful buyer stops and why, or what could not be answered. An unanswered question is named rather than passed over.
payeeNoThe address the ENDPOINT named in its handshake, which is not always the one its listing names. That disagreement is step three.
stepsNoOne per question, in the order a buyer asks them. Each carries `asks` in a person’s words, `state`, `stops` and `says`.
becauseNoThe NAME of the finding that decided it, two or three words, e.g. `Payee mismatch` or `Price moved`. NULL only where nothing decided, which is a clean walk: a verdict must not assert a cause it did not measure.
historyNoEVERY TIME WE HAVE KNOCKED, which is the half a checker cannot hold: it sees the endpoint now, only we hold the record of each time we looked. `state` is `answering`, `not-answering`, `unconfirmed` (one failure, which is a reason to ask again and not a finding), `seen-once` or `never-knocked` — the last two are about OUR reach and not about the seller. An outage is published as a RANGE and never as a duration: `downAtLeastHours` counts from the first knock that failed and `downAtMostHours` from the last that answered, because the stop happened somewhere between and that window is as wide as the gap between two knocks. `downAtMostHours` is NULL where nothing has ever answered, since there is then no moment to measure from and zero would read as a bound we do not have. `answered` of `knocks` is the denominator for everything here, `runs` is the timeline oldest first with a knock COUNT per run rather than a span, and `longestFailureRun` is counted in knocks for the same reason. NULL where the endpoint is not one we knock on.
networkNoThe chain the endpoint asked to be paid on, as it stated it, usually CAIP-2.
verdictNo`would-proceed`, `would-stop` or `cannot-tell`. The third is NOT the first.
headlineNoThe outcome in three words or fewer: `Purchase stopped`, `Cannot tell` or `A careful buyer would go ahead`. Same fact as `verdict`, in a reader’s words.
resourceYesThe endpoint this is about, read back.
askedWithNoThe values we put in, read back, so you can see the question that was actually asked. NULL where you sent none, which is the ordinary case.
cannotSeeNoWhat no rehearsal establishes however well it goes.
decidedAtNoThe id of the step that stopped it, so a caller acts on a step rather than parsing a sentence.
knockedOnNoThe URL we actually knocked on once your values were in it. NULL where you sent none, in which case it is `resource` unchanged.
quotedRawNoWhat it asked for, in the asset’s smallest unit. Always the number the endpoint actually said.
quotedUsdNoThe same amount in dollars, NULL where we could not scale it from the catalogue’s own pair.
rehearsedNoFalse where the endpoint is not in the catalogue, with `says` explaining that we do not fetch a URL because a request named it.
askedWithUnfilledNoPlaceholders in the catalogue URL we sent UNFILLED, e.g. `doi`. Empty is the ordinary case: the URL is an address, not a template. Non-empty qualifies the PRICE and not the availability — the endpoint answered and quoted, but for a call with a gap in it, so the figure may be the generic one rather than the price of the call you mean to make. Templates are a small part of the catalogue and `askedWithUnfilled` names the slots on each answer.
walkedPastTheStopNoTRUE where a question after the stopping one was still asked, which is deliberate: halting at the first objection would hide a second. FALSE means the stop was the last thing asked, or nothing stopped at all. Either way nothing financial happened, because none of these steps signs or spends.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources