Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_fees_summary

Retrieve historical fee and revenue summaries for cryptocurrency protocols to analyze financial performance over time.

Instructions

GET /api/summary/fees/{protocol}

Get summary of protocol fees and revenue with historical data.

Parameters:
    protocol: protocol slug (e.g., 'lyra')
    data_type: desired data type (default: 'dailyFees')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protocolYes
data_typeNodailyFees

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the 'get_fees_summary' tool. Decorated with @mcp.tool() for automatic registration in the MCP server. Fetches fees or revenue summary data for a given protocol from the DefiLlama API.
    @mcp.tool()
    async def get_fees_summary(
        protocol: str,
        data_type: Literal['dailyFees', 'dailyRevenue'] = 'dailyFees'
    ) -> str:
        """GET /api/summary/fees/{protocol}
        
        Get summary of protocol fees and revenue with historical data.
        
        Parameters:
            protocol: protocol slug (e.g., 'lyra')
            data_type: desired data type (default: 'dailyFees')
        """
        params = {'dataType': data_type}
        result = await make_request('GET', f'/api/summary/fees/{protocol}', params)
        return str(result)
  • Utility function used by the get_fees_summary handler (and other tools) 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 full burden for behavioral disclosure. It mentions historical data but doesn't specify time ranges, data freshness, rate limits, authentication requirements, or what the output contains beyond 'summary.' For a data retrieval tool with no annotation coverage, this leaves significant behavioral gaps.

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 concise with three sentences: the endpoint, core purpose, and parameter explanations. Each sentence adds value, though the parameter section could be slightly more structured. It's front-loaded with the most important information first.

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 an output schema (which handles return values), 2 parameters with reasonable description coverage, and no complex behavioral annotations needed, the description is moderately complete. However, it lacks usage context and some behavioral details that would help an agent understand when and how to invoke it effectively.

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 description adds meaningful parameter context beyond the schema. While schema description coverage is 0%, the description explains that 'protocol' is a 'slug (e.g., 'lyra')' and 'data_type' has a default value with implied options ('dailyFees', 'dailyRevenue'). This compensates well for the schema's lack of descriptions, though it doesn't fully document all parameter nuances.

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 summary of protocol fees and revenue with historical data.' It specifies the verb ('Get summary'), resource ('protocol fees and revenue'), and includes historical data scope. However, it doesn't explicitly differentiate from sibling tools like 'get_protocol_details' or 'get_protocol_tvl' that might also provide protocol-related data.

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, prerequisites, or contextual scenarios where this specific fee/revenue summary would be preferred over other protocol data tools in the extensive sibling list.

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