Skip to main content
Glama

Pay safe

pay_safe

Call this before sending USDC on Arc or Base. One EIP-712 PaySafeVerdict (domain APEX PaySafe, version 1, chainId 5042) covers the payee (Arc poison index, lookalikes, USDC blacklist, OFAC SDN file; Base is the USDC blacklist only and a missing lookalike index is CAUTION), a duplicate of resource+payee+amount+nonce when all three are present, our catalog price, and whether that endpoint has a prior delivered settlement. Verdicts: PASS, CAUTION, DO_NOT_PAY, COULD_NOT_READ. PASS needs every code clean. A missing nonce is CAUTION, not a stop. PayGuard does not read this type. This is not a permission to pay. 20 free a day at /pay-safe, then $0.01. Up to 10 for $0.03 (pass items). 100 prepaid checks for $0.20 are call units, not a USDC balance: pass credit. Hook: /pay-safe/apex-pay-safe.js (onBeforePaymentCreation). It stops only on DO_NOT_PAY, COULD_NOT_READ and a used-up free day. tier=lite is a separate $0.002 call at /api/x402/pay-safe-lite: payee check only. It does not run the duplicate, catalog price or delivery checks, it does not return PASS, and it does not use the free day or a credit. Drop-in examples for Syncly, Vestiarion, Mercenta, Elpis and Circle Gateway: https://apexfaucet.xyz/x402-clients/. Arc builders, including Tameion: https://apexfaucet.xyz/arc-builders/. 20 free full checks a day, then $0.01. Lite stays $0.002.

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": "pay_safe"
  }
}

Input Schema

NameRequiredDescriptionDefault
tierNofull (default, $0.01, every check) or lite ($0.002, payee check only). lite does not return PASS.
chainNoarc (default) or base
itemsNoJSON array of up to 10 checks. 11 is refused whole.
nonceNoEIP-3009 nonce, 0x and 64 hex. Omit it and the duplicate half is NOT_CHECKED.
payeeNo0x address that would be paid. Required unless items is set.
payerNooptional: your paying wallet
amountNoUSDC decimal like 0.01, or atomic units (9000 is $0.009) when resource and nonce are set
creditNoprepaid pay-safe token. Call units, not a USDC balance. Ignored when tier is lite.
windowNoSeconds for the duplicate half. Default 600.
paymentNoa signed x402 payment (base64, as in PAYMENT-SIGNATURE). Pass it here and the purchase completes inside this tool call.
resourceNohttps resource URL. Needed for the price and delivery checks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / credit / description
      Previous value: -"prepaid pay-safe token. Call units, not a USDC balance."New value: +"prepaid pay-safe token. Call units, not a USDC balance. Ignored when tier is lite."
    • addedInput schema / properties / tier
      Added value: +{
      +  "description": "full (default, $0.01, every check) or lite ($0.002, payee check only). lite does not return PASS.",
      +  "type": "string"
      +}
  2. Added

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: it lists the verdict set (PASS, CAUTION, DO_NOT_PAY, COULD_NOT_READ), explains that PASS requires every code clean, notes chain-specific scope (Arc poison index vs Base blacklist only), and states that a missing nonce is CAUTION rather than a stop. It also discloses pricing, the free-day limit, prepaid credit semantics, and that the hook stops only on DO_NOT_PAY, COULD_NOT_READ, or an exhausted free day.

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

Conciseness2/5

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

The description is a dense run-on that repeats pricing ('20 free a day ... then $0.01') twice and appends marketing links for named clients. Useful facts are buried mid-paragraph, so the reader must work to extract the core instruction despite the strong opening sentence.

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

Completeness4/5

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

For an 11-parameter, no-output-schema tool, the description covers the important context: verdict semantics, what each tier checks, pricing and credit behavior, and hook stop conditions. It stops short of describing the returned verdict payload's structure, which matters somewhat given the absence of an output schema, but the listed verdict values give an agent enough to act.

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 schema already explains tier, chain, nonce, credit, window, and payment. The description adds marginal meaning — for example, that omitting the nonce makes the duplicate half NOT_CHECKED and that the resulting verdict is CAUTION — but most parameter behavior is already in the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 trigger: 'Call this before sending USDC on Arc or Base,' making it a pre-payment risk check. The purpose is clear, but sibling differentiation is only partial — it calls out PayGuard and the lite tier, yet never positions itself against nearby tools like pay_preflight, arc_payment_check, or payment_verify.

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?

'Call this before sending USDC on Arc or Base' supplies a clear when-to-use condition, and the description distinguishes the full tier from tier=lite by listing what lite omits. It does not state when an agent should prefer a sibling tool such as pay_preflight or arc_payee_check, so the alternative-routing guidance is incomplete.

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.