get_protocol_details
Retrieve historical Total Value Locked (TVL) data and token-chain breakdowns for a specific protocol using its slug (e.g., 'aave').
Instructions
GET /api/protocol/{protocol}
Get historical TVL of a protocol and breakdowns by token and chain.
Parameters:
protocol: protocol slug (e.g., 'aave')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| protocol | Yes |
Implementation Reference
- defillama_server.py:82-92 (handler)The handler function for the 'get_protocol_details' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. The function makes an API request to DefiLlama's /api/protocol/{protocol} endpoint to retrieve historical TVL and breakdowns by token and chain for the specified protocol.@mcp.tool() async def get_protocol_details(protocol: str) -> str: """GET /api/protocol/{protocol} Get historical TVL of a protocol and breakdowns by token and chain. Parameters: protocol: protocol slug (e.g., 'aave') """ result = await make_request('GET', f'/api/protocol/{protocol}') return str(result)
- defillama_server.py:82-82 (registration)The @mcp.tool() decorator registers the get_protocol_details function as an MCP tool.@mcp.tool()
- defillama_server.py:83-90 (schema)The function signature defines the input schema (protocol: str) and return type (str). The docstring provides detailed description, API endpoint, and parameter example.async def get_protocol_details(protocol: str) -> str: """GET /api/protocol/{protocol} Get historical TVL of a protocol and breakdowns by token and chain. Parameters: protocol: protocol slug (e.g., 'aave') """