Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_historical_prices

Retrieve historical cryptocurrency token prices by contract address and timestamp for analysis and tracking.

Instructions

GET /coins/prices/historical/{timestamp}/{coins}

Get historical prices of tokens by contract address.

Parameters:
    timestamp: UNIX timestamp for historical prices
    coins: comma-separated tokens in format {chain}:{address}
    search_width: time range on either side to find price data (default: '6h')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timestampYes
coinsYes
search_widthNo6h

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the get_historical_prices tool. It fetches historical token prices from the DefiLlama API using the provided timestamp, coins, and search width.
    @mcp.tool()
    async def get_historical_prices(
        timestamp: int,
        coins: str,
        search_width: str = "6h"
    ) -> str:
        """GET /coins/prices/historical/{timestamp}/{coins}
        
        Get historical prices of tokens by contract address.
        
        Parameters:
            timestamp: UNIX timestamp for historical prices
            coins: comma-separated tokens in format {chain}:{address}
            search_width: time range on either side to find price data (default: '6h')
        """
        params = {'searchWidth': search_width}
        result = await make_request('GET', f'/coins/prices/historical/{timestamp}/{coins}', params)
        return str(result)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool is a GET operation, implying read-only behavior, but doesn't cover critical aspects like rate limits, error handling, authentication needs, or response format. The mention of 'search_width' hints at time-range behavior, but overall, the disclosure is insufficient for a tool with no annotation support.

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, with a clear purpose statement followed by parameter details. It uses bullet points for parameters, making it easy to parse. There's no wasted text, and it's front-loaded with the core functionality. A minor deduction for not being maximally concise (e.g., the URL line is redundant with the tool name).

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, no annotations, but with an output schema), the description is adequate but has gaps. It covers parameters well, and the output schema likely handles return values, so that's not needed. However, it lacks behavioral context (e.g., rate limits) and usage guidelines, making it incomplete for optimal agent operation. It meets the minimum viable standard but could be more comprehensive.

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 significant value beyond the input schema, which has 0% description coverage. It explains each parameter's purpose: 'timestamp' as a UNIX timestamp, 'coins' as comma-separated tokens in a specific format, and 'search_width' with its default value and meaning ('time range on either side to find price data'). This compensates well for the schema's lack of descriptions, though it doesn't detail all possible formats or constraints.

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 prices of tokens by contract address.' It specifies the verb ('Get'), resource ('historical prices'), and target ('tokens by contract address'), making it easy to understand. However, it doesn't explicitly differentiate from siblings like 'get_current_prices' or 'get_batch_historical_prices', which is why it doesn't reach a score of 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 doesn't mention siblings such as 'get_current_prices' for real-time data or 'get_batch_historical_prices' for multiple timestamps, nor does it specify prerequisites like required parameters or context. This lack of usage context leaves the agent without clear direction.

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