Skip to main content
Glama

Get Dex Volume

get_dex_volume
Read-only

Compare decentralized exchange activity via DeFiLlama: 24h/7d/30-day volume, period-over-period changes, and each protocol's share of reported global 24-hour DEX volume. Filter by protocol and rank by a 1-, 7-, or 30-day lookback window.

Use when: Use for landscape questions — which DEXs dominate volume, how activity shifted week-over-week, or a specific protocol's relative share. For executable swap pricing use get_dex_quote instead.

Limitations: Third-party DeFiLlama reporting, not on-chain truth; coverage gaps understate smaller protocols. 24-hour share is computed against the unfiltered global total, so filtered results retain landscape context.

Alternatives: get_dex_quote, get_chain_metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of DEX protocols to return.
protocolsNoOptional protocol names or DeFiLlama slugs, such as ['uniswap-v3', 'curve-dex']. When omitted, return the largest DEX protocols.
lookback_daysNoWindow used to rank the returned protocols: 1, 7, or 30 days (nearest supported window is used).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYes
dexesYes
errorNo
error_typeNo
total_matchingYes
total_availableYes
volume_share_basisYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / limit / title
      Added value: +"Limit"
    • addedInput schema / properties / lookback_days / title
      Added value: +"Lookback Days"
    • addedInput schema / properties / protocols / title
      Added value: +"Protocols"
    • addedInput schema / title
      Added value: +"mcp_get_dex_volumeArguments"
    • addedOutput schema / $defs
      Added value: +{
      +  "DexVolumeEntry": {
      +    "properties": {
      +      "category": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Category"
      +      },
      +      "chains": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Chains",
      +        "type": "array"
      +      },
      +      "error": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Error"
      +      },
      +      "error_type": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Error Type"
      +      },
      +      "protocol": {
      +        "title": "Protocol",
      +        "type": "string"
      +      },
      +      "slug": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Slug"
      +      },
      +      "volume_24h_usd": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Volume 24H Usd"
      +      },
      +      "volume_30d_change_pct": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Volume 30D Change Pct"
      +      },
      +      "volume_30d_usd": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Volume 30D Usd"
      +      },
      +      "volume_7d_change_pct": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Volume 7D Change Pct"
      +      },
      +      "volume_7d_usd": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Volume 7D Usd"
      +      },
      +      "volume_share_pct": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Volume Share Pct"
      +      }
      +    },
      +    "required": [
      +      "protocol",
      +      "slug",
      +      "category",
      +      "volume_24h_usd",
      +      "volume_7d_usd",
      +      "volume_30d_usd",
      +      "volume_7d_change_pct",
      +      "volume_30d_change_pct",
      +      "volume_share_pct",
      +      "chains"
      +    ],
      +    "title": "DexVolumeEntry",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / dexes / items / $ref
      Added value: +"#/$defs/DexVolumeEntry"
    • removedOutput schema / properties / dexes / items / properties
      Removed value: -{
      -  "category": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Category"
      -  },
      -  "chains": {
      -    "items": {
      -      "type": "string"
      -    },
      -    "title": "Chains",
      -    "type": "array"
      -  },
      -  "error": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "default": null,
      -    "title": "Error"
      -  },
      -  "error_type": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "default": null,
      -    "title": "Error Type"
      -  },
      -  "protocol": {
      -    "title": "Protocol",
      -    "type": "string"
      -  },
      -  "slug": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Slug"
      -  },
      -  "volume_24h_usd": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Volume 24H Usd"
      -  },
      -  "volume_30d_change_pct": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Volume 30D Change Pct"
      -  },
      -  "volume_30d_usd": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Volume 30D Usd"
      -  },
      -  "volume_7d_change_pct": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Volume 7D Change Pct"
      -  },
      -  "volume_7d_usd": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Volume 7D Usd"
      -  },
      -  "volume_share_pct": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Volume Share Pct"
      -  }
      -}
    • removedOutput schema / properties / dexes / items / required
      Removed value: -[
      -  "protocol",
      -  "slug",
      -  "category",
      -  "volume_24h_usd",
      -  "volume_7d_usd",
      -  "volume_30d_usd",
      -  "volume_7d_change_pct",
      -  "volume_30d_change_pct",
      -  "volume_share_pct",
      -  "chains"
      -]
    • removedOutput schema / properties / dexes / items / title
      Removed value: -"DexVolumeEntry"
    • removedOutput schema / properties / dexes / items / type
      Removed value: -"object"
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true, and the description adds meaningful behavioral context beyond that: data comes from third-party DeFiLlama reporting rather than on-chain truth, coverage gaps may understate smaller protocols, and the 24h share is computed against the unfiltered global total. These caveats materially inform how an agent should interpret results.

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

Conciseness5/5

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

The description is tightly structured with clear sections: core purpose first, then use cases, limitations, and alternatives. Every sentence earns its place, and the most decision-relevant information is front-loaded.

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

Completeness5/5

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

For a read-only tool with 3 optional parameters and an output schema, the description covers the purpose, data source, caveats, and alternatives. Nothing an agent needs in order to select and invoke this tool correctly is missing.

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 the input schema already documents all three parameters. The description adds light context by mapping 'protocols' to filtering and 'lookback_days' to ranking, but it does not provide substantial semantic value beyond the schema. Baseline 3 is appropriate.

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?

The description uses a specific verb ('Compare') with a clear resource (decentralized exchange activity via DeFiLlama) and enumerates the exact metrics returned: 24h/7d/30-day volume, period-over-period changes, and global share. It also distinguishes itself from siblings by naming get_dex_quote and get_chain_metrics, so an agent can tell this tool apart without opening schemas.

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?

The 'Use when' section explicitly identifies the intended landscape questions, and the limitation that executable swap pricing should use get_dex_quote instead provides a clear exclusion. The Alternatives line further reinforces routing, leaving no ambiguity about when this tool is appropriate.

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