Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_dex_overview_by_chain

Retrieve decentralized exchange overviews for a specific blockchain, including volume summaries and historical data, to analyze DEX performance and activity.

Instructions

GET /api/overview/dexs/{chain}

List all dexs along with summaries of their volumes and dataType history data filtering by chain.

Parameters:
    chain: chain name (e.g., 'ethereum')
    exclude_total_data_chart: true to exclude aggregated chart from response
    exclude_total_data_chart_breakdown: true to exclude broken down chart from response

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
exclude_total_data_chartNo
exclude_total_data_chart_breakdownNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function decorated with @mcp.tool(), implementing the logic to fetch DEX overview data for a specific chain from the DefiLlama API using the make_request helper. Includes input parameters with type hints serving as schema and comprehensive docstring.
    @mcp.tool()
    async def get_dex_overview_by_chain(
        chain: str,
        exclude_total_data_chart: bool = True,
        exclude_total_data_chart_breakdown: bool = True
    ) -> str:
        """GET /api/overview/dexs/{chain}
        
        List all dexs along with summaries of their volumes and dataType history data filtering by chain.
        
        Parameters:
            chain: chain name (e.g., 'ethereum')
            exclude_total_data_chart: true to exclude aggregated chart from response
            exclude_total_data_chart_breakdown: true to exclude broken down chart from response
        """
        params = {
            'excludeTotalDataChart': str(exclude_total_data_chart).lower(),
            'excludeTotalDataChartBreakdown': str(exclude_total_data_chart_breakdown).lower()
        }
        result = await make_request('GET', f'/api/overview/dexs/{chain}', params)
        return str(result)
  • The @mcp.tool() decorator registers the get_dex_overview_by_chain function as an MCP tool.
    @mcp.tool()
  • Docstring providing API endpoint description, parameters, and usage examples, functioning as input/output schema documentation.
    """GET /api/overview/dexs/{chain}
    
    List all dexs along with summaries of their volumes and dataType history data filtering by chain.
    
    Parameters:
        chain: chain name (e.g., 'ethereum')
        exclude_total_data_chart: true to exclude aggregated chart from response
        exclude_total_data_chart_breakdown: true to exclude broken down chart from response
    """
  • Shared helper function used by get_dex_overview_by_chain and other tools to perform 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 describes a read operation ('List') and mentions data filtering, but lacks critical details like whether this is a safe read-only operation, potential rate limits, authentication requirements, or what the output looks like (though an output schema exists). For a tool with no annotations, 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 sized and front-loaded, starting with a clear purpose statement followed by parameter details. Every sentence adds value, with no redundant information. However, the formatting could be slightly improved for readability (e.g., bullet points for parameters), but it remains efficient 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 (3 parameters, 1 required), no annotations, and the presence of an output schema, the description is minimally adequate. It covers the purpose and parameters but lacks behavioral context and usage guidelines. The output schema mitigates the need to explain return values, but more detail on tool behavior would improve completeness.

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 context beyond the input schema, which has 0% description coverage. It explains that 'chain' is a chain name with an example ('ethereum'), and clarifies the purpose of the two boolean parameters for excluding charts. This compensates well for the schema's lack of descriptions, though it doesn't detail all possible chain values or chart specifics.

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: 'List all dexs along with summaries of their volumes and dataType history data filtering by chain.' It specifies the verb ('List'), resource ('dexs'), and scope ('filtering by chain'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_dex_overview' or 'get_dex_summary', which prevents 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 filtering by chain but doesn't explain why one would choose this over other dex-related tools in the sibling list, such as 'get_dex_overview' or 'get_dex_summary'. There are no explicit when-to-use or when-not-to-use instructions, leaving usage context unclear.

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