Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_treasuries

Retrieve comprehensive data on cryptocurrency protocol treasuries from the DefiLlama Pro dashboard to analyze holdings and financial positions.

Instructions

GET /api/treasuries

List all protocols on our Treasuries dashboard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the get_treasuries MCP tool. Decorated with @mcp.tool() for automatic registration. Fetches the list of all protocols from the DefiLlama treasuries endpoint using the shared make_request helper and returns the JSON response as a string.
    @mcp.tool()
    async def get_treasuries() -> str:
        """GET /api/treasuries
        
        List all protocols on our Treasuries dashboard.
        """
        result = await make_request('GET', '/api/treasuries')
        return str(result)
  • The @mcp.tool() decorator registers this function as an MCP tool named 'get_treasuries'. The function has no input parameters, so the schema is implicitly empty.
    @mcp.tool()
    async def get_treasuries() -> str:
        """GET /api/treasuries
        
        List all protocols on our Treasuries dashboard.
        """
        result = await make_request('GET', '/api/treasuries')
        return str(result)
  • Shared helper function used by get_treasuries (and all other tools) to make 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 states the tool lists protocols but does not describe any behavioral traits such as rate limits, authentication needs, pagination, or response format. This leaves significant gaps in understanding how the tool operates beyond its basic purpose.

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 front-loaded, consisting of two sentences that directly state the tool's purpose. There is no wasted text, and it efficiently communicates the essential information. However, the inclusion of the API endpoint ('GET /api/treasuries') is slightly redundant but not detrimental to clarity.

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 that the tool has no parameters, an output schema exists, and no annotations are provided, the description is minimally adequate. It explains what the tool does but lacks details on behavioral aspects and usage context. With the output schema handling return values, the description is complete enough for basic understanding but could be more informative.

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 input schema has 0 parameters with 100% coverage, meaning no parameters are documented. The description does not add parameter information, which is acceptable since there are no parameters to explain. It meets the baseline for tools with zero parameters, though it doesn't compensate for any gaps (as there are none).

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: 'List all protocols on our Treasuries dashboard.' It specifies the verb ('List') and resource ('protocols on our Treasuries dashboard'), making it easy to understand what the tool does. However, it does not explicitly differentiate from sibling tools (e.g., 'get_protocols'), which keeps it from a perfect score.

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 does not mention any context, prerequisites, or exclusions, nor does it reference sibling tools like 'get_protocols' or 'get_protocol_details' that might serve similar purposes. This lack of usage instructions limits its effectiveness for an AI agent.

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