get_token_protocols
Retrieve token distribution across DeFi protocols by entering a token symbol to see holdings in each protocol.
Instructions
GET /api/tokenProtocols/{symbol}
Lists the amount of a certain token within all protocols.
Parameters:
symbol: token slug (e.g., 'usdt')
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>"
},
"name": "get_token_protocols"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- defillama_server.py:39-49 (handler)The handler function for the 'get_token_protocols' tool. It is decorated with @mcp.tool() for registration and implements the logic to fetch data from the DefiLlama API endpoint /api/tokenProtocols/{symbol} using the make_request helper. The function signature and docstring define the input schema (symbol: str).
@mcp.tool() async def get_token_protocols(symbol: str) -> str: """GET /api/tokenProtocols/{symbol} Lists the amount of a certain token within all protocols. Parameters: symbol: token slug (e.g., 'usdt') """ result = await make_request('GET', f'/api/tokenProtocols/{symbol}') return str(result)