Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_historical_chain_tvl_by_chain

Retrieve historical Total Value Locked data for a specific blockchain, excluding liquid staking and double-counted TVL, to analyze DeFi ecosystem growth over time.

Instructions

GET /api/v2/historicalChainTvl/{chain}

Get historical TVL (excludes liquid staking and double counted tvl) of a chain.

Parameters:
    chain: chain slug (e.g., 'Ethereum')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for get_historical_chain_tvl_by_chain tool. Registered via @mcp.tool() decorator. Fetches historical TVL data for a specific chain from DefiLlama API using the shared make_request helper.
    @mcp.tool()
    async def get_historical_chain_tvl_by_chain(chain: str) -> str:
        """GET /api/v2/historicalChainTvl/{chain}
        
        Get historical TVL (excludes liquid staking and double counted tvl) of a chain.
        
        Parameters:
            chain: chain slug (e.g., 'Ethereum')
        """
        result = await make_request('GET', f'/api/v2/historicalChainTvl/{chain}')
        return str(result)
  • Shared utility function used by the tool (and others) to perform HTTP requests to the DefiLlama Pro 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)}"
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 that the TVL excludes liquid staking and double-counted TVL, which is useful context, but lacks details on permissions, rate limits, response format, or error handling. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded, starting with the core purpose and then detailing parameters. It uses two sentences efficiently, with no wasted words, though it could be slightly more structured (e.g., separating usage notes).

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 low complexity (one parameter) and the presence of an output schema (which handles return values), the description is somewhat complete. However, with no annotations and missing usage guidelines, it falls short of providing full context for effective tool invocation, especially compared to siblings.

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?

The schema description coverage is 0%, but the description compensates by explaining the 'chain' parameter as a 'chain slug (e.g., 'Ethereum')', adding semantic meaning beyond the schema's basic type. However, with only one parameter, the baseline is high, and it doesn't fully detail format constraints or provide examples beyond one, so it meets but doesn't exceed expectations.

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 a chain.' It specifies the verb ('Get'), resource ('historical TVL'), and scope ('of a chain'), with important exclusions noted. However, it doesn't explicitly differentiate from sibling tools like 'get_historical_chain_tvl' (which appears to be a similar but distinct tool), keeping it from a perfect score.

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 mentions exclusions in the TVL calculation but doesn't compare it to other TVL-related tools in the sibling list, such as 'get_historical_chain_tvl' or 'get_protocol_tvl', leaving the agent without context for selection.

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