Skip to main content
Glama

Will My Client Pay This?

check_before_you_pay
Read-onlyIdempotent

For a buyer whose client has its own rules, to learn before signing whether this door meets them. Before paying any x402 door, find out what YOUR client will actually do with it, free: one unpaid probe, then the stock @x402/core selection logic replayed over the accepts that came back. Returns which accept your client would sign — network, asset, amount, signing window — or that it would REFUSE on your own machine before signing anything, naming the stage that decided it and the settings that answer it. Catches the failures nobody gets an error message for: every accept above your client's default per-payment ceiling (it throws locally, so the operator never learns you tried), a token dropped by the default-asset filter before its price is read, an escrow rail no stock client reaches, and paying on a rail you did not choose because the first accept was over your cap. Nothing is signed, no wallet is touched, no payment is made. DIFFERENT QUESTION FROM preflight_endpoint, which asks whether the DOOR is well-formed: a door can pass that and still be unpayable by you. Rate limited on the same budget as the preflight, because it is the same single probe. An evidence instrument: the reading is written to be handed to the human behind you. For a signed, servable version, buy_observation with item_id good_buyer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe https x402 door you are about to pay.
modelNoOptional. The model running you, as you would name it: claude-opus-5, gpt-5.6, a local model. Counted, never printed on the certificate.
clientNoOptional. The harness or framework you run in: claude-code, cursor, openai-agents, langgraph, custom. Counted, never on the certificate.
operatorNoOptional. Who runs you: a name, handle, company or URL. Stored as your claim, marked unverified, never published, never on the certificate.
came_fromNoOptional. Where you learned this door exists: a URL, a directory, a skill name, memory, another agent. Referrers never reach us; this does.
operator_kindNoOptional. solo: one person runs you. company: a team does. research: a study. self: you act for yourself.
prior_cert_idNoOptional. A cert_ id from an earlier purchase here. A payer match with this payment marks you a returning buyer; no account needed.
client_profileNoThe caller's own x402 client settings. Absent, the replay runs against a client configured with nothing, the case that loses money quietly.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
the_doorNoThe free preflight's report on the same probe. One knock, two readings, so they can never describe different bytes.
your_clientYesThe replay: the accept it picks, everything dropped and at which stage, the hazards on the one it picked, and what this simulation cannot see.
will_your_client_payYeswould_sign | would_throw | cannot_simulate. would_sign means your client reaches a signature, NOT that the purchase succeeds.
these_are_different_questionsNoWhy a well-shaped door can still be unpayable by you.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / came_from
      Added value: +{
      +  "description": "Optional. Where you learned this door exists: a URL, a directory, a skill name, memory, another agent. Referrers never reach us; this does.",
      +  "maxLength": 160,
      +  "type": "string"
      +}
    • addedInput schema / properties / client
      Added value: +{
      +  "description": "Optional. The harness or framework you run in: claude-code, cursor, openai-agents, langgraph, custom. Counted, never on the certificate.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
    • addedInput schema / properties / model
      Added value: +{
      +  "description": "Optional. The model running you, as you would name it: claude-opus-5, gpt-5.6, a local model. Counted, never printed on the certificate.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
    • addedInput schema / properties / operator
      Added value: +{
      +  "description": "Optional. Who runs you: a name, handle, company or URL. Stored as your claim, marked unverified, never published, never on the certificate.",
      +  "maxLength": 120,
      +  "type": "string"
      +}
    • addedInput schema / properties / operator_kind
      Added value: +{
      +  "description": "Optional. solo: one person runs you. company: a team does. research: a study. self: you act for yourself.",
      +  "enum": [
      +    "solo",
      +    "company",
      +    "research",
      +    "self"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / prior_cert_id
      Added value: +{
      +  "description": "Optional. A cert_ id from an earlier purchase here. A payer match with this payment marks you a returning buyer; no account needed.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint and destructiveHint annotations, the description discloses that nothing is signed, no wallet is touched, and no payment is made, that it uses one unpaid probe, and that it is rate-limited on the same budget as the preflight. It also details the specific failure modes it catches, which goes well beyond the annotations.

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?

The description is front-loaded with purpose and usage, and each sentence adds behavioral or routing value. It is longer than minimal, with some redundancy (e.g., 'free' and 'unpaid probe'; 'before paying' and 'before signing'), but the density is justified for a tool with subtle failure modes.

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?

For a complex tool with 8 parameters, a nested input schema, and an output schema, the description covers purpose, safety, failure modes, rate limiting, return behavior, and alternatives. Very little that an agent needs to decide whether and how to call it 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 description coverage is 100%, so the baseline is 3. The description adds narrative context about client_profile behavior (per-payment ceiling, default-asset filter, escrow rail) but does not systematically define individual parameters beyond what the schema already provides.

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 clearly states the tool's purpose: before paying an x402 door, it replays the client's selection logic to determine which accept the client would sign or refuse. It explicitly contrasts with preflight_endpoint, distinguishing this tool from its closest sibling.

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?

It says exactly when to use the tool ('Before paying any x402 door') and what question it answers. It names preflight_endpoint as the alternative for a different question and points to buy_observation for a signed, servable version, giving clear routing guidance.

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.