Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_historical_liquidity

Retrieve historical liquidity data for token swaps on specific blockchain networks to analyze trading conditions and market depth over time.

Instructions

GET /api/historicalLiquidity/{token}

Provides the available liquidity for swapping from one token to another on a specific chain.

Parameters:
    token: token slug (e.g., 'usdt')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool handler for 'get_historical_liquidity'. Decorated with @mcp.tool() for registration. Takes a token slug, queries the DefiLlama API for historical liquidity data, and returns the JSON response as a string.
    @mcp.tool()
    async def get_historical_liquidity(token: str) -> str:
        """GET /api/historicalLiquidity/{token}
        
        Provides the available liquidity for swapping from one token to another on a specific chain.
        
        Parameters:
            token: token slug (e.g., 'usdt')
        """
        result = await make_request('GET', f'/api/historicalLiquidity/{token}')
        return str(result)
  • Shared helper function used by get_historical_liquidity (and other tools) to make HTTP requests to the DefiLlama 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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool provides liquidity data but doesn't specify whether it's read-only, requires authentication, has rate limits, or details the response format (though an output schema exists). For a tool with no annotation coverage, this is a significant gap in describing behavioral traits.

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, with the core purpose stated first followed by parameter details. It uses two sentences efficiently, though the parameter section could be integrated more smoothly. There's no wasted text, making it concise and well-structured.

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 moderate complexity (1 parameter, no annotations, but with an output schema), the description is partially complete. It covers the basic purpose and parameter example but lacks usage guidelines and behavioral context. The output schema mitigates some gaps, but overall, it's adequate with clear room for improvement.

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 description adds minimal semantics beyond the input schema. It explains the 'token' parameter as 'token slug (e.g., 'usdt')', which provides an example but doesn't clarify format constraints or source. With 0% schema description coverage and 1 parameter, this is adequate but not comprehensive, aligning with the baseline expectation.

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: 'Provides the available liquidity for swapping from one token to another on a specific chain.' It specifies the verb ('Provides'), resource ('available liquidity'), and scope ('swapping from one token to another on a specific chain'). However, it doesn't explicitly differentiate from sibling tools like 'get_historical_prices' or 'get_current_prices', which might also involve tokens but serve different purposes.

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 any prerequisites, exclusions, or specific contexts (e.g., historical vs. current data, swapping scenarios). With many sibling tools related to tokens and prices, this lack of differentiation leaves the agent uncertain about appropriate usage.

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