Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_historical_chain_tvl

Retrieve historical Total Value Locked data for DeFi across all blockchain chains, excluding liquid staking and double-counted TVL, to analyze decentralized finance trends over time.

Instructions

GET /api/v2/historicalChainTvl

Get historical TVL (excludes liquid staking and double counted tvl) of DeFi on all chains.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_historical_chain_tvl' MCP tool. It is registered via the @mcp.tool() decorator, which also infers the schema from the docstring (no parameters). The function calls the DefiLlama API endpoint /api/v2/historicalChainTvl and returns the JSON response as a string.
    @mcp.tool()
    async def get_historical_chain_tvl() -> str:
        """GET /api/v2/historicalChainTvl
        
        Get historical TVL (excludes liquid staking and double counted tvl) of DeFi on all chains.
        """
        result = await make_request('GET', '/api/v2/historicalChainTvl')
        return str(result)
  • Shared helper function used by all DefiLlama API tools, including get_historical_chain_tvl, to make HTTP requests to the API.
    async def make_request(method: str, endpoint: str, params: Optional[Dict[str, Any]] = None) -> Any:
        """Make a request to the DefiLlama API."""
        try:
            response = await client.request(method, endpoint, params=params)
            response.raise_for_status()
            return response.json()
        except Exception as e:
            return f"Error: {str(e)}"
  • Docstring providing the tool description, which FastMCP uses to generate the tool schema. No input parameters are defined.
    """GET /api/v2/historicalChainTvl
    
    Get historical TVL (excludes liquid staking and double counted tvl) of DeFi on all chains.
    """
  • The @mcp.tool() decorator registers the function as an MCP tool with the name 'get_historical_chain_tvl'.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the HTTP method (GET) and data exclusions (liquid staking and double counted TVL), but lacks details on rate limits, authentication needs, response format, pagination, or error handling. For a data-fetching tool, this is a significant gap in 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 highly concise and front-loaded: it starts with the HTTP endpoint, then directly states the purpose in a single sentence. There is no wasted text, and every element (method, resource, exclusions) serves a clear purpose, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's complexity (historical data fetching), no annotations, and an output schema present, the description is minimally adequate. It covers the core purpose and exclusions but lacks behavioral context (e.g., data freshness, limitations). The output schema reduces the need to explain return values, but more guidance on usage and constraints would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate. However, it could have mentioned implicit parameters like date ranges or filters if applicable, but given the schema, a baseline of 4 is justified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get historical TVL (excludes liquid staking and double counted tvl) of DeFi on all chains.' It specifies the action (GET), resource (historical TVL), and scope (all chains, with exclusions). However, it doesn't explicitly differentiate from sibling tools like 'get_historical_chain_tvl_by_chain' or 'get_protocol_tvl', which might handle similar data differently.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_historical_chain_tvl_by_chain' (which might filter by chain) or 'get_protocol_tvl' (which might focus on protocols), leaving the agent to infer usage based on names alone. No exclusions or prerequisites are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xReisearch/crypto-mcp-beta'

If you have feedback or need assistance with the MCP directory API, please join our Discord server