Skip to main content
Glama

dex.liquidity_slippage

Read-only

Use this tool to calculate expected DEX price slippage, pool liquidity depth, and optimal routing before executing an on-chain token swap. GeckoTerminal-backed pool analytics with constant-product slippage estimation for the requested trade_size_usd, plus a slippage_tiers array with the same estimate at fixed $1,000/$5,000/$10,000 sizes so an agent can gauge depth at a glance without extra calls. When called with token_address, also returns direct_stablecoin_pool_exists and, when the selected pool isn't USD-quoted, alternate_direct_pool - a different pool for the same token that is, so you know before swapping whether a multi-hop route is actually required or whether a direct pool exists elsewhere. Do not use for centralized exchange (CEX) orderbooks or contract risk analysis. Paid in USDC on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoGeckoTerminal network id, e.g. base, eth. Defaults to base.
pool_addressNoSpecific DEX pool contract address (optional if token_address is given).
token_addressNoToken contract address - the most liquid pool is auto-selected (optional if pool_address is given).
trade_size_usdYesHypothetical trade size in USD to estimate slippage for.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noticeNo
networkYes
pool_nameNo
data_sourceYes
generated_atYes
pool_addressNo
pool_fee_pctNoSwap fee tier of the selected pool, parsed from pool_name. Disclosed for reference only - not subtracted from the slippage estimate.
liquidity_usdNo
token_addressNo
slippage_tiersNo
trade_size_usdYes
volume_24h_usdNo
price_impact_modelYes
quote_token_symbolNoParsed from pool_name (e.g. 'USDC' from 'WETH / USDC 0.05%').
assumed_gas_cost_usdNoFlat per-swap gas estimate for this network, not a live gas quote.
alternate_direct_poolNoOnly set when quote_token_is_stablecoin is false/null AND a stablecoin-quoted pool exists elsewhere for this token - lets you re-query with that pool_address instead of assuming a multi-hop route.
estimated_slippage_pctNo
quote_token_is_stablecoinNoIf false or null, this pool isn't USD-quoted - an extra hop is needed to reach USD, not accounted for in the slippage estimate.
direct_stablecoin_pool_existsNoWhether ANY pool for this token (not just the one selected above) is quoted directly against a USD stablecoin. Null when pool_address was passed directly (no full pool list was fetched).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / alternate_direct_pool
      Added value: +{
      +  "description": "Only set when quote_token_is_stablecoin is false/null AND a stablecoin-quoted pool exists elsewhere for this token - lets you re-query with that pool_address instead of assuming a multi-hop route.",
      +  "properties": {
      +    "liquidity_usd": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "pool_address": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "pool_name": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "quote_token_symbol": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / direct_stablecoin_pool_exists
      Added value: +{
      +  "description": "Whether ANY pool for this token (not just the one selected above) is quoted directly against a USD stablecoin. Null when pool_address was passed directly (no full pool list was fetched).",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  2. Changed4 schema fields changed
    • addedOutput schema / properties / assumed_gas_cost_usd
      Added value: +{
      +  "description": "Flat per-swap gas estimate for this network, not a live gas quote.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / pool_fee_pct
      Added value: +{
      +  "description": "Swap fee tier of the selected pool, parsed from pool_name. Disclosed for reference only - not subtracted from the slippage estimate.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / quote_token_is_stablecoin
      Added value: +{
      +  "description": "If false or null, this pool isn't USD-quoted - an extra hop is needed to reach USD, not accounted for in the slippage estimate.",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / quote_token_symbol
      Added value: +{
      +  "description": "Parsed from pool_name (e.g. 'USDC' from 'WETH / USDC 0.05%').",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  3. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources