Skip to main content
Glama

Slippage estimate

xrpl_slippage
Read-onlyIdempotent

Slippage and average price for buying or selling an amount of base currency. When to use: Before placing a market-style trade, to size it against available depth and to see whether the CLOB or the AMM pool gives the better average price for the side. Prefer another tool: It is an estimate, not a quote, and it does not split an amount across venues or route through other pairs. To read pool reserves, use the amm page. Example: xrpl_slippage {"base":"XRP","quote":"USD.rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B","amount":"1000"} Paid: 0.02904 USDC or 0.0242 EURC per call on Solana mainnet, VAT included. With prepaid credits, debit per call: 0.02 EUR-denominated units (approx 50 calls per bundle) or 0.024 USD-denominated units (approx 34 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>",
      "amount": "<amount>"
    },
    "name": "xrpl_slippage"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYesBase currency: `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.
sideNoTrade direction: buy walks the asks (pays quote for amount of base), sell walks the bids (sells amount of base for quote)
depthNoLevels per side: a positive integer no larger than 9007199254740991, rounded up to 10, 50 or 100; a larger depth is served at 100 (default 100)
quoteYesQuote currency: `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.
amountYesPositive decimal amount of base to buy or sell
domainNoOptional PermissionedDomain id (64 hex): reads that domain's permissioned order book; slippage then skips the AMM

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / depth / description
      Previous value: -"Levels per side: a positive integer, rounded up to 10, 50 or 100; a larger depth is served at 100 (default 100)"New value: +"Levels per side: a positive integer no larger than 9007199254740991, rounded up to 10, 50 or 100; a larger depth is served at 100 (default 100)"
  2. Changed6 schema fields changed
    • changedInput schema / properties / amount / description
      Previous value: -"Positive decimal amount of base to buy"New value: +"Positive decimal amount of base to buy or sell"
    • changedInput schema / properties / base / description
      Previous value: -"Base currency: `XRP` (no issuer) or `CODE.issuer` with a valid classic-address issuer (e.g. `USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh`)"New value: +"Base currency: `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."
    • changedInput schema / properties / depth / description
      Previous value: -"Levels per side: a positive integer, rounded up to 10, 50, 100 or 200 (max 200)"New value: +"Levels per side: a positive integer, rounded up to 10, 50 or 100; a larger depth is served at 100 (default 100)"
    • addedInput schema / properties / domain
      Added value: +{
      +  "description": "Optional PermissionedDomain id (64 hex): reads that domain's permissioned order book; slippage then skips the AMM",
      +  "type": "string"
      +}
    • changedInput schema / properties / quote / description
      Previous value: -"Quote currency: `XRP` (no issuer) or `CODE.issuer` with a valid classic-address issuer (e.g. `USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh`)"New value: +"Quote currency: `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."
    • addedInput schema / properties / side
      Added value: +{
      +  "description": "Trade direction: buy walks the asks (pays quote for amount of base), sell walks the bids (sells amount of base for quote)",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "$defs": {
      -    "Meta": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "age_seconds": {
      -          "description": "Age of the data at response time",
      -          "maximum": 9007199254740991,
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "as_of": {
      -          "description": "When the data was read from the ledger",
      -          "format": "date-time",
      -          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      -          "type": "string"
      -        },
      -        "cache": {
      -          "enum": [
      -            "hit",
      -            "miss",
      -            "stale"
      -          ],
      -          "type": "string"
      -        },
      -        "ledger_index": {
      -          "description": "Validated ledger the data comes from",
      -          "maximum": 9007199254740991,
      -          "minimum": -9007199254740991,
      -          "type": "integer"
      -        },
      -        "stale": {
      -          "description": "True when served past its fresh TTL (stale-on-error)",
      -          "type": "boolean"
      -        }
      -      },
      -      "required": [
      -        "ledger_index",
      -        "as_of",
      -        "age_seconds",
      -        "cache",
      -        "stale"
      -      ],
      -      "type": "object"
      -    }
      -  },
      -  "$schema": "https://json-schema.org/draft/2020-12/schema",
      -  "additionalProperties": false,
      -  "properties": {
      -    "amount": {
      -      "description": "Decimal string",
      -      "type": "string"
      -    },
      -    "avg_price": {
      -      "anyOf": [
      -        {
      -          "description": "Decimal string",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "avg_price_after_fees": {
      -      "anyOf": [
      -        {
      -          "description": "Decimal string",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "base": {
      -      "type": "string"
      -    },
      -    "best_price": {
      -      "anyOf": [
      -        {
      -          "description": "Decimal string",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "depth": {
      -      "maximum": 9007199254740991,
      -      "minimum": -9007199254740991,
      -      "type": "integer"
      -    },
      -    "filled": {
      -      "description": "Decimal string",
      -      "type": "string"
      -    },
      -    "insufficient_liquidity": {
      -      "type": "boolean"
      -    },
      -    "meta": {
      -      "$ref": "#/$defs/Meta"
      -    },
      -    "partial": {
      -      "type": "boolean"
      -    },
      -    "quote": {
      -      "type": "string"
      -    },
      -    "side": {
      -      "const": "buy",
      -      "type": "string"
      -    },
      -    "slippage_pct": {
      -      "anyOf": [
      -        {
      -          "description": "Decimal string",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "description": "Percent, null when liquidity is insufficient"
      -    },
      -    "transfer_fee": {
      -      "anyOf": [
      -        {
      -          "description": "Decimal string",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "transfer_fee_applied": {
      -      "type": "boolean"
      -    },
      -    "venues": {
      -      "additionalProperties": false,
      -      "description": "CLOB vs AMM comparison for the same amount; no routing split",
      -      "properties": {
      -        "amm": {
      -          "anyOf": [
      -            {
      -              "additionalProperties": false,
      -              "properties": {
      -                "avg_price": {
      -                  "anyOf": [
      -                    {
      -                      "description": "Decimal string",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "Quote paid per base received, null when it cannot fill"
      -                },
      -                "avg_price_after_fees": {
      -                  "anyOf": [
      -                    {
      -                      "description": "Decimal string",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "avg_price x issuer TransferRate, null when the rate is unknown"
      -                },
      -                "cost": {
      -                  "anyOf": [
      -                    {
      -                      "description": "Decimal string",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "Total quote paid for `amount`, null when it cannot fill"
      -                },
      -                "insufficient_liquidity": {
      -                  "type": "boolean"
      -                },
      -                "slippage_pct": {
      -                  "anyOf": [
      -                    {
      -                      "description": "Decimal string",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "Percent vs the fee-free pool spot price (includes the trading fee), null when it cannot fill"
      -                },
      -                "spot_price": {
      -                  "description": "Pool spot price, quote per base, excluding fee and impact",
      -                  "type": "string"
      -                },
      -                "trading_fee": {
      -                  "description": "Pool trading fee as a fraction, like /v1/xrpl/amm",
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "avg_price",
      -                "cost",
      -                "slippage_pct",
      -                "insufficient_liquidity",
      -                "avg_price_after_fees",
      -                "spot_price",
      -                "trading_fee"
      -              ],
      -              "type": "object"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "description": "Null when the pair has no pool or the pool could not be read (see amm_status)"
      -        },
      -        "amm_status": {
      -          "description": "State of the AMM read: ok, stale (served past its fresh window), no_pool, unavailable",
      -          "enum": [
      -            "ok",
      -            "stale",
      -            "no_pool",
      -            "unavailable"
      -          ],
      -          "type": "string"
      -        },
      -        "best": {
      -          "anyOf": [
      -            {
      -              "enum": [
      -                "clob",
      -                "amm"
      -              ],
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "description": "Cheaper venue by avg_price (ties go to the CLOB), null when neither can fill"
      -        },
      -        "clob": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "avg_price": {
      -              "anyOf": [
      -                {
      -                  "description": "Decimal string",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "Quote paid per base received, null when it cannot fill"
      -            },
      -            "avg_price_after_fees": {
      -              "anyOf": [
      -                {
      -                  "description": "Decimal string",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "avg_price x issuer TransferRate, null when the rate is unknown"
      -            },
      -            "cost": {
      -              "anyOf": [
      -                {
      -                  "description": "Decimal string",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "Total quote paid for `amount`, null when it cannot fill"
      -            },
      -            "insufficient_liquidity": {
      -              "type": "boolean"
      -            },
      -            "slippage_pct": {
      -              "anyOf": [
      -                {
      -                  "description": "Decimal string",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "Percent vs the best ask, null when it cannot fill"
      -            }
      -          },
      -          "required": [
      -            "avg_price",
      -            "cost",
      -            "slippage_pct",
      -            "insufficient_liquidity",
      -            "avg_price_after_fees"
      -          ],
      -          "type": "object"
      -        }
      -      },
      -      "required": [
      -        "best",
      -        "amm_status",
      -        "clob",
      -        "amm"
      -      ],
      -      "type": "object"
      -    }
      -  },
      -  "required": [
      -    "base",
      -    "quote",
      -    "side",
      -    "depth",
      -    "amount",
      -    "filled",
      -    "partial",
      -    "insufficient_liquidity",
      -    "best_price",
      -    "avg_price",
      -    "slippage_pct",
      -    "transfer_fee_applied",
      -    "transfer_fee",
      -    "avg_price_after_fees",
      -    "venues",
      -    "meta"
      -  ],
      -  "type": "object"
      -}New value: +null
  4. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds value beyond that: it is an estimate rather than a firm quote, it does not split an amount across venues or route through other pairs, and it discloses per-call cost. It does not state error behavior (e.g., thin book, no AMM path), which keeps it below 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?

Strong front-loading: purpose first, then labeled 'When to use', 'Prefer another tool' and 'Example' blocks. However, the pricing trailer runs two long sentences with duplicated unit conversions (USDC/EURC, EUR-denominated/USD-denominated, bundle call counts), which is a large share of the text for a single fact. The core definition is tight; the cost disclosure is bloated.

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?

No output schema exists, so the description carries the return-value burden, and it does signal that the result includes slippage, average price and an implicit CLOB-vs-AMM comparison for the requested side. With 6 parameters, 3 required, and 100% schema coverage, the remaining schema burden is light. What is missing is the result shape (does it return both venue prices plus the chosen one?) and behavior on insufficient depth.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 and the schema does the heavy lifting on base/quote/side/depth/domain. The description still adds meaning by framing 'depth' as sizing against available depth and 'side' as the CLOB-vs-AMM comparison axis, and the concrete worked example ('base':'XRP', a real issuer, 'amount':'1000') anchors the string formats. That is modest value above the schema, not a rehash of it.

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 concrete verb-like outcome (estimating slippage and average price) plus the resource (base/quote pair and amount), so the function is immediately clear. It also bounds its own scope (an estimate, not a quote; no venue splitting or cross-pair routing), which separates it from order-book or path-finding siblings. It stops short of naming the specific sibling that produces a firm quote, so the differentiation is scoped but not fully enumerated.

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' (before placing a market-style trade, to size against available depth, to compare CLOB vs AMM for the side) and an explicit 'Prefer another tool' block stating what it is not. It also routes one adjacent need elsewhere ('To read pool reserves, use the amm page'), which is a real when-not pointer. Guidance an agent can act on without inference.

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