Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_chains

Retrieve current total value locked (TVL) data for all blockchain networks to analyze DeFi ecosystem metrics and chain performance.

Instructions

GET /api/v2/chains

Get current TVL of all chains.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_chains' MCP tool. It is decorated with @mcp.tool() for automatic registration and schema generation. Fetches the current TVL of all chains from the DefiLlama API using the shared make_request helper.
    @mcp.tool()
    async def get_chains() -> str:
        """GET /api/v2/chains
        
        Get current TVL of all chains.
        """
        result = await make_request('GET', '/api/v2/chains')
        return str(result)
  • Shared helper function used by get_chains (and all 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)}"
  • The @mcp.tool() decorator registers the get_chains function as an MCP tool with the name derived from the function name.
    @mcp.tool()
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 states the action ('Get') and data type ('current TVL of all chains'), but lacks details on permissions, rate limits, data freshness, pagination, or error handling. For a tool with zero annotation coverage, this is a significant gap in transparency about how the tool behaves in practice.

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 extremely concise and front-loaded: it states the HTTP method and endpoint ('GET /api/v2/chains') followed by the core purpose in a single sentence. There is zero waste or redundancy, making it easy to parse quickly. Every sentence earns its place by providing essential information.

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 has no parameters, an output schema exists, and the purpose is simple (fetching current TVL), the description is minimally adequate. However, with no annotations and sibling tools that might overlap (e.g., historical TVL tools), it lacks context on data scope, freshness, or differentiation. The output schema will handle return values, but the description doesn't fully compensate for the missing behavioral context.

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 here. A baseline score of 4 is given because the tool has no parameters, and the description correctly avoids unnecessary parameter explanations.

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 current TVL of all chains.' It specifies the verb ('Get') and resource ('TVL of all chains'), making the function unambiguous. However, it doesn't differentiate this from sibling tools like 'get_historical_chain_tvl' or 'get_historical_chain_tvl_by_chain', which likely provide similar TVL data but with different scopes or timeframes.

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 'current TVL' but doesn't clarify if this is real-time data, daily snapshots, or how it differs from historical TVL tools in the sibling list. There are no explicit when/when-not instructions or named alternatives, leaving usage context implied at best.

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