Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_current_prices

Retrieve current cryptocurrency token prices by contract address using comma-separated chain:address format to monitor market values.

Instructions

GET /coins/prices/current/{coins}

Get current prices of tokens by contract address.

Parameters:
    coins: comma-separated tokens in format {chain}:{address} (e.g., 'ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum')
    search_width: time range on either side to find price data (default: '6h')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinsYes
search_widthNo6h

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_current_prices' tool. It is registered via the @mcp.tool() decorator and implements the logic to fetch current token prices from the DefiLlama API by calling the shared make_request helper with the appropriate endpoint and parameters.
    @mcp.tool()
    async def get_current_prices(
        coins: str,
        search_width: str = "6h"
    ) -> str:
        """GET /coins/prices/current/{coins}
        
        Get current prices of tokens by contract address.
        
        Parameters:
            coins: comma-separated tokens in format {chain}:{address} (e.g., 'ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum')
            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/current/{coins}', params)
        return str(result)
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 the API endpoint ('GET /coins/prices/current/{coins}') and a default parameter value, but doesn't describe error handling, rate limits, authentication needs, response format, or what happens with invalid inputs. 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: the first sentence states the purpose clearly, followed by parameter details. There's no wasted text, and the structure (purpose then parameters) is logical. It could be slightly more concise by integrating the endpoint into the purpose statement, but it's efficient overall.

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, no annotations, but with an output schema), the description is partially complete. It covers the purpose and parameters well, but lacks behavioral context (e.g., error cases, rate limits). The presence of an output schema means return values don't need explanation, but other operational aspects are missing, making it adequate but with clear gaps.

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 substantial meaning beyond the input schema, which has 0% description coverage. It explains the 'coins' parameter format ('comma-separated tokens in format {chain}:{address}') with an example, and clarifies 'search_width' as 'time range on either side to find price data' with a default. This compensates well for the schema's lack of documentation, though it doesn't detail all possible values 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 current prices of tokens by contract address.' It specifies the verb ('Get'), resource ('current prices of tokens'), and mechanism ('by contract address'). However, it doesn't explicitly differentiate from sibling tools like 'get_historical_prices' or 'get_stablecoin_prices', which is why it doesn't earn a 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 sibling tools (e.g., 'get_historical_prices' for historical data, 'get_stablecoin_prices' for stablecoins) or any prerequisites. The only implied context is the need for current token prices, but no explicit usage instructions are given.

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