Skip to main content
Glama

Kryptonian Labs XRPL APIs

Slippage estimate

estimate_slippage
Read-onlyIdempotent

Slippage and average price for buying 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 is the cheaper venue. 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: estimate_slippage {"base":"XRP","quote":"USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh","amount":"1000"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYesBase currency: `XRP` (no issuer) or `CODE.issuer` with a valid classic-address issuer (e.g. `USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh`)
depthNoLevels per side: a positive integer, rounded up to 10, 50, 100 or 200 (max 200)
quoteYesQuote currency: `XRP` (no issuer) or `CODE.issuer` with a valid classic-address issuer (e.g. `USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh`)
amountYesPositive decimal amount of base to buy

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYes
metaYes
sideYes
depthYes
quoteYes
amountYesDecimal string
filledYesDecimal string
venuesYesCLOB vs AMM comparison for the same amount; no routing split
partialYes
avg_priceYes
best_priceYes
slippage_pctYesPercent, null when liquidity is insufficient
transfer_feeYes
avg_price_after_feesYes
transfer_fee_appliedYes
insufficient_liquidityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / venues
      Added value: +{
      +  "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/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"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "base",
      -  "quote",
      -  "side",
      -  "depth",
      -  "amount",
      -  "filled",
      -  "partial",
      -  "insufficient_liquidity",
      -  "best_price",
      -  "avg_price",
      -  "slippage_pct",
      -  "transfer_fee_applied",
      -  "transfer_fee",
      -  "avg_price_after_fees",
      -  "meta"
      -]New value: +[
      +  "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"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuinely non-obvious behavioral context: this is a read-only estimate that does not split amounts across venues or route through other pairs, which materially affects how results should be interpreted.

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?

Front-loaded with purpose, then usage, then exclusion, then a concrete example — a sensible ordering. Slightly dense with the 'Prefer another tool' phrasing sitting awkwardly against the limitations listed, but no sentence is redundant.

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?

An output schema exists, so return values need not be described. With 100% schema coverage, annotations covering safety, and the description supplying usage conditions, exclusions, an example, and the estimate-not-quote caveat, an agent has enough to call it correctly. Minor gap: no mention of depth's effect on the estimate.

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 base, quote, amount and depth are already documented with formats and constraints in the schema. The description's worked example reinforces base/quote/amount but adds nothing about the optional depth parameter, so it neither compensates nor regresses. 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?

States a specific verb and resource — estimate slippage and average price for buying an amount of base currency — and immediately scopes it against the sibling tools by contrasting CLOB vs AMM pool. An agent can distinguish this from get_orderbook or get_amm without opening a 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?

Explicit 'When to use' (before placing a market-style trade, to size against depth and compare venues) and an explicit 'Prefer another tool' clause stating it is an estimate rather than a quote and does not split or route. It also names the sibling (amm page) for reading reserves, leaving little to 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