Skip to main content
Glama

XRPL x402 preflight

xrpl_x402_preflight
Read-onlyIdempotent

Can this payer settle this x402 payment requirement right now? When to use: After an x402 server answered 402 with an XRPL exact requirement: to check, before signing, that this payer can settle that exact requirement to that recipient now. Prefer another tool: For a payment that is not an x402 requirement (use /v1/xrpl/payment-readiness), or once the payment has settled (use /v1/xrpl/payment/verify). Example: xrpl_x402_preflight {"asset":"XRP","amount":"10000000","pay_to":"rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq","payer":"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"} Paid: 0.04356 USDC or 0.0363 EURC per call on Solana mainnet, VAT included. With prepaid credits, debit per call: 0.03 EUR-denominated units (approx 33 calls per bundle) or 0.036 USD-denominated units (approx 22 calls per bundle).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "asset": "<asset>",
      "amount": "<amount>",
      "pay_to": "<pay_to>",
      "payer": "<payer>"
    },
    "name": "xrpl_x402_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetYesAsset of the x402 requirement: XRP, or the currency code of an issued asset (3 characters, case-sensitive, or 40 hexadecimal characters) whose issuer goes in issuer. Standard codes are case-sensitive: `usd` and `USD` are different tokens.
payerYesWallet that would pay: valid classic XRPL address (r..., checksum verified)
amountYesAmount the requirement asks for: a whole number of drops for XRP, a positive decimal in token units for an issued asset
issuerNoIssuer of the asset (extra.issuer of the requirement): a valid classic XRPL address; required unless the asset is XRP
pay_toYesAccount the requirement pays: valid classic XRPL address
destination_tagNoDestination tag the requirement states (extra.destinationTag): an integer from 0 to 4294967295; it is passed to the readiness check

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered; the description adds the meaningful behavior that this is a pre-signing gate against one exact requirement and recipient, plus per-call cost/prepaid debit terms. It does not say what a failing or passing result looks like, which is the remaining behavioral gap for a decision tool.

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

Conciseness3/5

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

The question, 'When to use', 'Prefer another tool' and example are front-loaded and well ordered. However, the pricing block consumes roughly a third of the text and is not needed to select or invoke the tool; its unit wording ('Paid: 0.04356 USDC or 0.0363 EURC', 'EUR-denominated units') is also confusing for an XRPL tool.

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

Completeness3/5

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

For a six-parameter read-only preflight with no output schema, the definition covers when to call and what inputs mean, but never says what the check returns or how a negative result should be interpreted by the agent. That return-semantics gap is the main incompleteness.

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 all six parameters (including issuer and destination_tag conditional on asset type) are already documented in the schema. The description contributes only a worked example rather than additional parameter meaning, so baseline 3 applies.

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?

Leads with a specific, answerable question ('Can this payer settle this x402 payment requirement right now?') that names the resource (x402 requirement), the network (XRPL) and the subject (payer). It explicitly separates itself from xrpl_payment_readiness and xrpl_payment_verify, so an agent can pick it without opening the 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 an explicit trigger ('After an x402 server answered 402 with an XRPL `exact` requirement') and an explicit timing constraint ('before signing'). It also names two when-not cases with the correct alternative tool each, which removes the main ambiguity an agent would face.

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.

Resources