Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_yield_chart

Retrieve historical APY and TVL data for specific DeFi pools to analyze yield performance trends over time.

Instructions

GET /yields/chart/{pool}

Get historical APY and TVL of a pool.

Parameters:
    pool: pool id (can be retrieved from /pools)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poolYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_yield_chart' MCP tool. It is decorated with @mcp.tool(), which registers it, and implements the tool logic by calling the DefiLlama API endpoint /yields/chart/{pool} to retrieve historical APY and TVL for a given pool ID.
    @mcp.tool()
    async def get_yield_chart(pool: str) -> str:
        """GET /yields/chart/{pool}
        
        Get historical APY and TVL of a pool.
        
        Parameters:
            pool: pool id (can be retrieved from /pools)
        """
        result = await make_request('GET', f'/yields/chart/{pool}')
        return str(result)
  • Shared utility function used by the get_yield_chart handler (and all 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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving historical data (APY and TVL), which suggests a read-only operation, but doesn't clarify aspects like rate limits, authentication needs, data freshness, or error handling. For a tool with no 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 concise and well-structured: it starts with the HTTP method and endpoint, states the purpose in a clear sentence, and lists parameters with brief explanations. There's no wasted text, and the information is front-loaded, making it easy to scan. It could be slightly more polished but is efficient overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple retrieval with one parameter), the description covers the essential purpose and parameter semantics adequately. The presence of an output schema means the description doesn't need to explain return values, and the lack of annotations is partially offset by the clear read-only implication. However, more behavioral details would enhance completeness for a tool with no annotations.

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 for the single parameter 'pool', explaining it's a 'pool id (can be retrieved from /pools)'. This clarifies the parameter's purpose and source, which is valuable since the schema description coverage is 0% (the schema only provides a title 'Pool' without explanation). The description compensates well for the schema's lack of detail.

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 APY and TVL of a pool.' It specifies the verb ('Get') and resources ('historical APY and TVL of a pool'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_yield_chart_lend_borrow' or 'get_yield_pools', which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage context by mentioning that the pool ID 'can be retrieved from /pools', which implies a prerequisite. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_yield_chart_lend_borrow' or 'get_yield_pools', nor does it specify any exclusions or conditions for use. The guidance is implied but not comprehensive.

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