Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_protocol_details

Retrieve historical TVL data for DeFi protocols with breakdowns by token and chain. Use this tool to analyze protocol performance and asset distribution across networks.

Instructions

GET /api/protocol/{protocol}

Get historical TVL of a protocol and breakdowns by token and chain.

Parameters:
    protocol: protocol slug (e.g., 'aave')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protocolYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the 'get_protocol_details' tool. It is registered via @mcp.tool() decorator. Fetches historical TVL and breakdowns for a given protocol from DefiLlama API using the shared make_request helper.
    @mcp.tool()
    async def get_protocol_details(protocol: str) -> str:
        """GET /api/protocol/{protocol}
        
        Get historical TVL of a protocol and breakdowns by token and chain.
        
        Parameters:
            protocol: protocol slug (e.g., 'aave')
        """
        result = await make_request('GET', f'/api/protocol/{protocol}')
        return str(result)
  • Registration of the 'get_protocol_details' tool using the @mcp.tool() decorator.
    @mcp.tool()
  • Input schema: protocol (str). Output: str (JSON response). Docstring provides description.
    async def get_protocol_details(protocol: str) -> str:
  • Shared utility function used by get_protocol_details (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 full burden. It mentions retrieving historical data but doesn't disclose behavioral traits like rate limits, authentication needs, data freshness, or pagination. The description is minimal and lacks operational context.

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 front-loaded with the core purpose, followed by parameter details. It's efficient with minimal waste, though the structure is simple and could be more polished for readability.

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 1 parameter with 0% schema coverage and an output schema, the description is adequate but incomplete. It explains the parameter but lacks behavioral context, and the output schema reduces the need to describe return values, though more operational details would help.

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?

Schema description coverage is 0%, but the description compensates by explaining the 'protocol' parameter as a slug with an example ('aave'). This adds meaningful semantics beyond the bare schema, though it's brief and could be more detailed.

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 retrieves historical TVL data with breakdowns by token and chain for a specific protocol. It specifies the verb (GET/retrieve) and resource (protocol details), though it doesn't explicitly differentiate from sibling tools like 'get_protocol_tvl' or 'get_protocols'.

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?

No guidance is provided on when to use this tool versus alternatives. With many sibling tools like 'get_protocol_tvl' and 'get_protocols', the description lacks context about use cases, prerequisites, or comparisons, leaving the agent to infer 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