Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_protocol_inflows

Retrieve inflow and outflow data for a specific DeFi protocol at a given timestamp to analyze capital movements and protocol activity.

Instructions

GET /api/inflows/{protocol}/{timestamp}

Lists the amount of inflows and outflows for a protocol at a given date.

Parameters:
    protocol: protocol slug (e.g., 'compound-v3')
    timestamp: unix timestamp (e.g., 1700006400)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protocolYes
timestampYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the get_protocol_inflows MCP tool. It is registered via the @mcp.tool() decorator and implements the logic to fetch inflows/outflows data for a protocol at a specific timestamp from the DefiLlama API, returning the result as a string. The function signature and docstring define the input schema.
    async def get_protocol_inflows(protocol: str, timestamp: int) -> str:
        """GET /api/inflows/{protocol}/{timestamp}
        
        Lists the amount of inflows and outflows for a protocol at a given date.
        
        Parameters:
            protocol: protocol slug (e.g., 'compound-v3')
            timestamp: unix timestamp (e.g., 1700006400)
        """
        result = await make_request('GET', f'/api/inflows/{protocol}/{timestamp}')
        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 states the tool lists data (implying a read operation) but doesn't cover critical aspects like rate limits, authentication needs, error handling, or response format. For a tool with no annotations, 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 appropriately sized and front-loaded, starting with the API endpoint and a clear purpose statement. The parameter explanations are concise and directly relevant. There's no wasted text, though it could be slightly more structured (e.g., bullet points).

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 there's an output schema (which handles return values) and the description compensates for the 0% schema coverage with parameter semantics, the description is adequate but incomplete. It lacks behavioral details (e.g., rate limits, auth) and usage guidelines, which are important for a tool with no annotations and multiple siblings.

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 semantics beyond the input schema, which has 0% description coverage. It explains that 'protocol' is a 'protocol slug' with an example ('compound-v3') and 'timestamp' is a 'unix timestamp' with an example (1700006400). This clarifies the parameter formats, compensating well 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: 'Lists the amount of inflows and outflows for a protocol at a given date.' It specifies the verb ('Lists') and resource ('inflows and outflows for a protocol'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'get_protocol_details' or 'get_protocol_tvl', which might also provide protocol-related data.

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 any prerequisites, exclusions, or compare it to sibling tools such as 'get_protocol_details' or 'get_protocol_tvl', leaving the agent to infer usage context from the name and description alone.

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