Skip to main content
Glama

XRPL arbitrage

xrpl_metrics_arbitrage
Read-onlyIdempotent

Whether a pair's AMM pool and its order book are apart after the AMM fee: per direction the gap, the executable size and the profit after transfer fees. When to use: To find whether a pair's AMM pool and its funded order book are apart after the AMM fee, in which direction, how much base the gap allows and the profit after transfer fees, optionally with the cycles of the USD registry stablecoins via XRP. Prefer another tool: To estimate the cost of a trade of a given size, CLOB against AMM (use /v1/xrpl/slippage), or to read the order book levels (use /v1/xrpl/orderbook) or an AMM pool (use /v1/xrpl/amm/{a}/{b}); the answer measures the ledger and is not an executable quote. Example: xrpl_metrics_arbitrage {"base":"XRP","quote":"524C555344000000000000000000000000000000.rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"} 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": {
      "base": "<base>",
      "quote": "<quote>"
    },
    "name": "xrpl_metrics_arbitrage"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYesBase currency of the pair: `XRP`, or `CODE.issuer`: `CODE` is a 3-character standard code or 40 hexadecimal digits, and `issuer` is a classic XRPL address. Standard codes are case-sensitive: `usd` and `USD` are different tokens, so send the exact code. A standard code uses letters, digits or `?!@#$%^&*<>(){}[]|` and is never `XRP`; percent-encode the symbols in a URL (for example `%3F` for `?`). A 40-hex code is read in any case, and the 40-hex form of a standard code means that code.
quoteYesQuote currency of the pair, different from base: `XRP`, or `CODE.issuer`: `CODE` is a 3-character standard code or 40 hexadecimal digits, and `issuer` is a classic XRPL address. Standard codes are case-sensitive: `usd` and `USD` are different tokens, so send the exact code. A standard code uses letters, digits or `?!@#$%^&*<>(){}[]|` and is never `XRP`; percent-encode the symbols in a URL (for example `%3F` for `?`). A 40-hex code is read in any case, and the 40-hex form of a standard code means that code.
include_trianglesNoThe string "true" adds the cycles of the USD registry coins (RLUSD, USDC) via XRP; "false" or omitted leaves them out

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely useful behavior beyond that: fees are netted (AMM fee and transfer fees), the output is a ledger measurement rather than a quote, and the per-call cost is disclosed. It does not mention rate limits or response latency, which keeps it short of a 5.

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?

Purpose is front-loaded and the alternatives section is tight, but the 'When to use' sentence re-states the opening almost word-for-word, and the pricing paragraph consumes roughly a third of the text with two overlapping billing schemes that an agent does not need in order to select or invoke the tool.

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?

There is no output schema, so the description must convey the return shape, and it does: per-direction gap, executable size and post-fee profit, with the caveat that it is a measurement not a quote. Combined with a fully documented three-parameter schema, an agent has enough to call it correctly; only the response structure's exact fields remain implicit.

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%, including the base/quote CODE.issuer format and the include_triangles semantics, so the schema already carries the parameter burden. The description mostly mirrors that (the triangles explanation and the example pair) rather than adding new constraints or defaults, so the baseline 3 applies.

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 description names a specific measurement — whether a pair's AMM pool and funded order book are apart after the AMM fee, plus per-direction gap, executable size and profit after transfer fees. It is clearly distinguishable from xrpl_slippage and xrpl_orderbook. It loses a point because the opening sentence is a verbless noun phrase and the purpose is then restated almost verbatim in the 'When to use' section.

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?

Explicit when-to-use is given, followed by an explicit 'Prefer another tool' list naming the concrete alternatives (slippage for a sized trade cost, orderbook for book levels, amm for a pool). It also states the key exclusion: the answer measures the ledger and is not an executable quote.

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