Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_stablecoin_charts_by_chain

Retrieve historical market capitalization charts for stablecoins on specific blockchain networks to analyze stablecoin adoption and trends over time.

Instructions

GET /stablecoins/stablecoincharts/{chain}

Get historical mcap sum of all stablecoins in a chain.

Parameters:
    chain: chain slug (e.g., 'Ethereum')
    stablecoin: stablecoin ID (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
stablecoinNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function decorated with @mcp.tool() registers and implements the tool. It constructs parameters if stablecoin is provided and calls the shared make_request helper to fetch data from DefiLlama's /stablecoins/stablecoincharts/{chain} endpoint, returning the JSON response as a string.
    @mcp.tool()
    async def get_stablecoin_charts_by_chain(chain: str, stablecoin: Optional[int] = None) -> str:
        """GET /stablecoins/stablecoincharts/{chain}
        
        Get historical mcap sum of all stablecoins in a chain.
        
        Parameters:
            chain: chain slug (e.g., 'Ethereum')
            stablecoin: stablecoin ID (optional)
        """
        params = {}
        if stablecoin is not None:
            params['stablecoin'] = stablecoin
        result = await make_request('GET', f'/stablecoins/stablecoincharts/{chain}', params)
        return str(result)
  • Shared helper function used by all tools, including get_stablecoin_charts_by_chain, to make HTTP requests to the DefiLlama API using httpx.
    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 states this is a GET operation (implying read-only) and describes the output ('historical mcap sum'), but lacks critical details: it doesn't specify the time range or granularity of 'historical' data, whether results are paginated, rate limits, authentication requirements, or error conditions. For a data-fetching tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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: the first line states the purpose clearly, followed by a structured parameters section. There's no wasted text, and each sentence adds value (e.g., the parameters list clarifies usage). However, it could be slightly more concise by integrating the parameter details into a single flowing sentence, and the URL path duplication is minor redundancy.

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 (2 parameters, historical data fetching), the description is minimally adequate. It explains the purpose and parameters but lacks behavioral context (e.g., time ranges, pagination). The presence of an output schema (not shown) means the description doesn't need to detail return values, but without annotations, it should cover more operational aspects like data freshness or constraints. It's complete enough for basic use but leaves gaps for robust agent invocation.

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?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description adds value by explaining 'chain' as a 'chain slug (e.g., 'Ethereum')' and 'stablecoin' as an 'optional' 'stablecoin ID', giving basic semantics. However, it doesn't clarify where to find valid chain slugs or stablecoin IDs, the format of the ID (integer vs. string), or how the optional parameter affects results (e.g., filtering vs. aggregation). With 2 parameters and low schema coverage, this partial compensation earns a baseline 3.

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 historical mcap sum of all stablecoins in a chain.' This specifies the verb ('Get'), resource ('historical mcap sum'), and scope ('all stablecoins in a chain'). It distinguishes from siblings like 'get_stablecoin_charts_all' (which lacks chain filtering) and 'get_stablecoin_history' (which focuses on individual stablecoin history rather than aggregate mcap). However, it doesn't explicitly contrast with all relevant siblings (e.g., 'get_stablecoin_chains'), keeping it at 4 rather than 5.

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 an optional 'stablecoin' parameter but doesn't explain when to include it (e.g., to filter to a specific stablecoin vs. get all). There's no mention of prerequisites, data freshness, or comparison to siblings like 'get_stablecoin_charts_all' (for all chains) or 'get_stablecoin_history' (for individual stablecoin details).

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