get_user_data
Retrieve user data by specifying data type and protocol ID using the REI Crypto MCP Server, enabling direct access to user-related information in crypto applications.
Instructions
GET /api/userData/{type}/{protocolId}
Get user data by type and protocol.
Parameters:
type: data type (e.g., 'activeUsers')
protocol_id: protocol ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| protocol_id | Yes | ||
| type | Yes |
Implementation Reference
- defillama_server.py:235-246 (handler)The main handler function for the 'get_user_data' tool. It is decorated with @mcp.tool(), which registers it with the FastMCP server. The function makes an API request to DefiLlama's /api/userData/{type}/{protocol_id} endpoint and returns the result as a string.@mcp.tool() async def get_user_data(type: str, protocol_id: int) -> str: """GET /api/userData/{type}/{protocolId} Get user data by type and protocol. Parameters: type: data type (e.g., 'activeUsers') protocol_id: protocol ID """ result = await make_request('GET', f'/api/userData/{type}/{protocol_id}') return str(result)