Skip to main content
Glama

Get Chain Metrics

get_chain_metrics
Read-only

Compare blockchain ecosystem health via DeFiLlama: current TVL, 7/30-day TVL change, and aggregate fee activity. Pass chains such as ['Ethereum', 'Arbitrum', 'Solana'] for a focused comparison, or omit chains to inspect the highest-TVL ecosystems.

Use when: Use for ecosystem-level comparisons — which chains are growing, where fee activity concentrates, or how a chain's TVL trended. For a single protocol's economics use get_protocol_tvl instead.

Limitations: Third-party DeFiLlama analytics; historical and fee fields fail open (null) for uncovered chains. Not a real-time measure of chain throughput or security.

Alternatives: get_protocol_tvl, get_dex_volume

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.

  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.7/5.0
Behavior5/5

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

The annotations only declare readOnlyHint=true, which is minimal. The description adds meaningful behavioral context: it names the third-party data source (DeFiLlama), states that historical and fee fields fail open as null for uncovered chains, and warns that this is not a real-time measure of chain throughput or security. These caveats materially affect how an agent should interpret and trust 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 well organized: a compact opening sentence covering the core purpose and metrics, followed by clearly labeled 'Use when,' 'Limitations,' and 'Alternatives' sections. Every sentence contributes meaningful decision-support information, and the most important scoping statement 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?

Given that the tool has no required parameters, has an output schema, and carries only a readOnlyHint annotation, the description covers everything the agent needs: what the tool does, when to use it, what limits apply, and which siblings to fall back on. The additional caveats about null fields and non-real-time data complete the operational picture.

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 an example of chain filtering and an explanation of omission behavior, but the schema already provides equivalent detail for the chains parameter)SkipTo: 'Optional chain names to compare... When omitted, return highest-TVL chains up to limit.' Thus the description adds no significant semantic value beyond the schema.

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 ('blockchain ecosystem health via DeFiLlama') and enumerates the exact metrics returned: current TVL, 7/30-day TVL change, and aggregate fee activity. It also distinguishes itself from get_protocol_tvl and get_dex_volume by naming them directly, so an agent can tell this tool apart from sibling data tools.

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 states the intended ecosystem-level use cases and gives a concrete exclusion: for a single protocol's economics, use get_protocol_tvl. It also names get_dex_volume as an alternative and explains how the omit-chains behavior differs from passing an explicit chain list. This gives sufficient routing guidance without leaving anything 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