Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_price_percentage

Calculate percentage price changes for cryptocurrency tokens over specified time periods using chain and address identifiers.

Instructions

GET /coins/percentage/{coins}

Get percentage change in price over time.

Parameters:
    coins: comma-separated tokens in format {chain}:{address}
    timestamp: timestamp of data point (defaults to now)
    look_forward: whether to look forward from timestamp (default: False)
    period: duration between data points (default: '24h')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinsYes
timestampNo
look_forwardNo
periodNo24h

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_price_percentage' tool. Decorated with @mcp.tool() for registration. Calls DefiLlama API /coins/percentage/{coins} to get percentage change in price over a specified period.
    @mcp.tool()
    async def get_price_percentage(
        coins: str,
        timestamp: Optional[int] = None,
        look_forward: bool = False,
        period: str = "24h"
    ) -> str:
        """GET /coins/percentage/{coins}
        
        Get percentage change in price over time.
        
        Parameters:
            coins: comma-separated tokens in format {chain}:{address}
            timestamp: timestamp of data point (defaults to now)
            look_forward: whether to look forward from timestamp (default: False)
            period: duration between data points (default: '24h')
        """
        params = {
            'lookForward': str(look_forward).lower(),
            'period': period
        }
        if timestamp is not None:
            params['timestamp'] = timestamp
        result = await make_request('GET', f'/coins/percentage/{coins}', params)
        return str(result)
  • The @mcp.tool() decorator registers the get_price_percentage function as an MCP tool.
    @mcp.tool()
  • Shared helper function used by get_price_percentage 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 the full burden of behavioral disclosure. It states the tool is a GET operation and describes parameters, but lacks critical behavioral details: it doesn't specify authentication needs, rate limits, error conditions, or what the output contains (though an output schema exists). For a tool with no annotations, this is insufficient to understand its operational 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 well-structured and appropriately sized. It starts with the endpoint and a clear purpose statement, followed by a bullet-point list of parameters with explanations. Each sentence earns its place, but it could be slightly more concise by integrating the endpoint into the purpose statement.

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 moderate complexity (4 parameters, 1 required) and the presence of an output schema, the description is reasonably complete. It covers the purpose and parameters in detail, which addresses the main gaps. However, it lacks usage guidelines and behavioral context, which are important for a tool with no annotations, preventing a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant value beyond the input schema, which has 0% schema description coverage. It explains the format for 'coins' ('comma-separated tokens in format {chain}:{address}'), clarifies 'timestamp' as 'timestamp of data point (defaults to now)', defines 'look_forward' as 'whether to look forward from timestamp (default: False)', and specifies 'period' as 'duration between data points (default: '24h')'. This fully compensates for the schema's lack of descriptions.

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 percentage change in price over time.' This specifies the verb ('get'), resource ('percentage change in price'), and scope ('over time'), making it distinct from sibling tools like get_current_prices or get_historical_prices. However, it doesn't explicitly differentiate from all siblings, such as get_fdv_performance, which might also involve price-related metrics.

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 like get_price_chart or get_historical_prices, nor does it specify use cases, prerequisites, or exclusions. This leaves the agent without context for tool selection among the many price-related options.

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