Skip to main content
Glama

Get Chain Metrics

get_chain_metrics
Read-only

Compare blockchain ecosystem health using DeFiLlama current TVL, 7-day and 30-day TVL changes, and aggregate fee activity. Pass chains such as ['Ethereum', 'Arbitrum', 'Solana'] for a focused comparison, or omit chains to inspect the highest-TVL ecosystems. Historical and fee fields fail open when DeFiLlama does not cover a chain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoLookback window used when selecting the historical TVL points to inspect.
limitNoMaximum number of chain rows to return when the result is not explicitly filtered.
chainsNoOptional chain names to compare, such as ['Ethereum', 'Arbitrum', 'Solana']. When omitted, return the highest-TVL chains up to limit.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYes
errorNo
chainsYes
error_typeNo
provenanceNoSource and freshness metadata for the DeFiLlama response.
total_availableYes
requested_chainsYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed12 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / chains / title
      Added value: +"Chains"
    • addedInput schema / properties / days / title
      Added value: +"Days"
    • addedInput schema / properties / limit / title
      Added value: +"Limit"
    • addedInput schema / title
      Added value: +"mcp_get_chain_metricsArguments"
    • addedOutput schema / $defs
      Added value: +{
      +  "ChainMetricsEntry": {
      +    "properties": {
      +      "chain": {
      +        "title": "Chain",
      +        "type": "string"
      +      },
      +      "chain_id": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Chain Id"
      +      },
      +      "error": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Error"
      +      },
      +      "error_type": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Error Type"
      +      },
      +      "fees_24h_usd": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Fees 24H Usd"
      +      },
      +      "fees_30d_change_pct": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Fees 30D Change Pct"
      +      },
      +      "fees_30d_usd": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Fees 30D Usd"
      +      },
      +      "fees_7d_change_pct": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Fees 7D Change Pct"
      +      },
      +      "fees_7d_usd": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Fees 7D Usd"
      +      },
      +      "token_symbol": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Token Symbol"
      +      },
      +      "tvl_30d_change_pct": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Tvl 30D Change Pct"
      +      },
      +      "tvl_7d_change_pct": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Tvl 7D Change Pct"
      +      },
      +      "tvl_usd": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Tvl Usd"
      +      }
      +    },
      +    "required": [
      +      "chain",
      +      "chain_id",
      +      "token_symbol",
      +      "tvl_usd",
      +      "tvl_7d_change_pct",
      +      "tvl_30d_change_pct",
      +      "fees_24h_usd",
      +      "fees_7d_usd",
      +      "fees_30d_usd",
      +      "fees_7d_change_pct",
      +      "fees_30d_change_pct"
      +    ],
      +    "title": "ChainMetricsEntry",
      +    "type": "object"
      +  },
      +  "DataProvenance": {
      +    "description": "Machine-readable source and freshness metadata for a tool response.",
      +    "properties": {
      +      "cache_age_seconds": {
      +        "anyOf": [
      +          {
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Cache Age Seconds"
      +      },
      +      "cache_hit": {
      +        "default": false,
      +        "title": "Cache Hit",
      +        "type": "boolean"
      +      },
      +      "cache_ttl_seconds": {
      +        "anyOf": [
      +          {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Cache Ttl Seconds"
      +      },
      +      "provider": {
      +        "title": "Provider",
      +        "type": "string"
      +      },
      +      "retrieved_at": {
      +        "title": "Retrieved At",
      +        "type": "string"
      +      },
      +      "source_fetched_at": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Source Fetched At"
      +      },
      +      "source_urls": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Source Urls",
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "provider",
      +      "retrieved_at"
      +    ],
      +    "title": "DataProvenance",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / chains / items / $ref
      Added value: +"#/$defs/ChainMetricsEntry"
    • removedOutput schema / properties / chains / items / properties
      Removed value: -{
      -  "chain": {
      -    "title": "Chain",
      -    "type": "string"
      -  },
      -  "chain_id": {
      -    "anyOf": [
      -      {
      -        "type": "integer"
      -      },
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Chain Id"
      -  },
      -  "error": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "default": null,
      -    "title": "Error"
      -  },
      -  "error_type": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "default": null,
      -    "title": "Error Type"
      -  },
      -  "fees_24h_usd": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Fees 24H Usd"
      -  },
      -  "fees_30d_change_pct": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Fees 30D Change Pct"
      -  },
      -  "fees_30d_usd": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Fees 30D Usd"
      -  },
      -  "fees_7d_change_pct": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Fees 7D Change Pct"
      -  },
      -  "fees_7d_usd": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Fees 7D Usd"
      -  },
      -  "token_symbol": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Token Symbol"
      -  },
      -  "tvl_30d_change_pct": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Tvl 30D Change Pct"
      -  },
      -  "tvl_7d_change_pct": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Tvl 7D Change Pct"
      -  },
      -  "tvl_usd": {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Tvl Usd"
      -  }
      -}
    • removedOutput schema / properties / chains / items / required
      Removed value: -[
      -  "chain",
      -  "chain_id",
      -  "token_symbol",
      -  "tvl_usd",
      -  "tvl_7d_change_pct",
      -  "tvl_30d_change_pct",
      -  "fees_24h_usd",
      -  "fees_7d_usd",
      -  "fees_30d_usd",
      -  "fees_7d_change_pct",
      -  "fees_30d_change_pct"
      -]
    • removedOutput schema / properties / chains / items / title
      Removed value: -"ChainMetricsEntry"
    • removedOutput schema / properties / chains / items / type
      Removed value: -"object"
    • changedOutput schema / properties / provenance / anyOf
      Previous value: -[
      -  {
      -    "description": "Machine-readable source and freshness metadata for a tool response.",
      -    "properties": {
      -      "cache_age_seconds": {
      -        "anyOf": [
      -          {
      -            "minimum": 0,
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Cache Age Seconds"
      -      },
      -      "cache_hit": {
      -        "default": false,
      -        "title": "Cache Hit",
      -        "type": "boolean"
      -      },
      -      "cache_ttl_seconds": {
      -        "anyOf": [
      -          {
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Cache Ttl Seconds"
      -      },
      -      "provider": {
      -        "title": "Provider",
      -        "type": "string"
      -      },
      -      "retrieved_at": {
      -        "title": "Retrieved At",
      -        "type": "string"
      -      },
      -      "source_fetched_at": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Source Fetched At"
      -      },
      -      "source_urls": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "title": "Source Urls",
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "provider",
      -      "retrieved_at"
      -    ],
      -    "title": "DataProvenance",
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "$ref": "#/$defs/DataProvenance"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Machine-readable source and freshness metadata for a tool response.",
      +      "properties": {
      +        "cache_age_seconds": {
      +          "anyOf": [
      +            {
      +              "minimum": 0,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Cache Age Seconds"
      +        },
      +        "cache_hit": {
      +          "default": false,
      +          "title": "Cache Hit",
      +          "type": "boolean"
      +        },
      +        "cache_ttl_seconds": {
      +          "anyOf": [
      +            {
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Cache Ttl Seconds"
      +        },
      +        "provider": {
      +          "title": "Provider",
      +          "type": "string"
      +        },
      +        "retrieved_at": {
      +          "title": "Retrieved At",
      +          "type": "string"
      +        },
      +        "source_fetched_at": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Source Fetched At"
      +        },
      +        "source_urls": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "title": "Source Urls",
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "provider",
      +        "retrieved_at"
      +      ],
      +      "title": "DataProvenance",
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Source and freshness metadata for the DeFiLlama response."
      +}
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

The description adds behavioral detail beyond the readOnlyHint annotation by stating that 'Historical and fee fields fail open when DeFiLlama does not cover a chain.' This discloses important fallback behavior that the annotation does not convey, providing meaningful transparency.

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 three sentences, front-loads the core purpose, then gives usage guidance, and ends with a caveat. Every sentence earns its place with no fluff or redundancy.

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?

Given the tool's moderate complexity, the presence of an output schema, and readOnlyHint annotation, the description is complete. It covers purpose, usage patterns, default behavior (highest-TVL), and a key edge case (fail-open), leaving no major gaps.

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 coverage is 100%, so the schema already explains each parameter. The description adds value by illustrating usage of the chains parameter with an example and clarifying the limit behavior ('omit chains to inspect the highest-TVL ecosystems'). However, it doesn't add detail about the days parameter, so a baseline of 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 starts with a specific verb and resource: 'Compare blockchain ecosystem health using DeFiLlama current TVL, 7-day and 30-day TVL changes, and aggregate fee activity.' This clearly distinguishes it from sibling tools like get_protocol_tvl or get_dex_volume, which focus on different metrics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage contexts: 'Pass chains such as [...] for a focused comparison, or omit chains to inspect the highest-TVL ecosystems.' While it doesn't explicitly name alternatives or exclusion cases, it effectively communicates when and how to use the tool, earning a 4 rather than a 5.

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.

TDQS

A3.7/5.0
Disambiguation3/5

Most tools target distinct data sources, but several near-duplicates exist: get_token_approvals/get_wallet_approvals, get_defi_positions/get_wallet_positions, and get_wallet_portfolio/get_eth_balance. The descriptions do cross-reference and clarify the differences, so an agent can disambiguate with effort, but names alone are not enough.

Naming Consistency4/5

The dominant get_<noun> pattern is clear and nearly all names use lowercase snake_case with verb-first conventions. A few tools like calculate, record_predictions, http_fetch, and web_search break the get_ pattern, but the overall style remains predictable.

Tool Count2/5

34 tools is excessive for a single server, even for a broad DeFi/onchain analytics domain. The count is inflated by generic utilities such as calculate, count_text_stats, web_search, and http_fetch, plus multiple overlapping data-retrieval endpoints, making the surface hard to scan.

Completeness4/5

The set covers an unusually wide range of domain operations: prices, balances, portfolio/positions, approvals, yields, TVL, DEX quotes/volume, transactions, blocks, gas, ENS, contract reads, and risk assessments. It is view-only by design, so missing write/transaction tools is acceptable; minor gaps like address-based token pricing or transaction simulation are workaround-able.

Resources