Skip to content

Commit 226c686

Browse files
Adam BaloghAdam Balogh
authored andcommitted
prompt
1 parent 72b6f12 commit 226c686

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

defi/analytics/defillama_tools.py

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,57 @@
77

88
@tool()
99
def show_defi_llama_protocol(protocol_slug: str) -> Dict[str, Any]:
10-
"""Get details for a DeFi protocol by slug"""
10+
"""
11+
Get details for a DeFi protocol by slug
12+
"""
1113
return defillama.get_protocol(protocol_slug)
1214

1315

1416
@tool()
1517
def show_defi_llama_pool(pool_id: str) -> Dict[str, Any]:
16-
"""Get details for a DeFi pool by ID"""
18+
"""
19+
Get details for a DeFi pool by ID
20+
"""
1721
return defillama.get_pool(pool_id)
1822

1923

2024
@tool()
2125
def show_defi_llama_global_tvl() -> Dict[str, Any]:
22-
"""Get current global TVL across all DeFi protocols"""
26+
"""
27+
Get current global TVL across all DeFi protocols
28+
"""
2329
tvl = defillama.get_global_tvl()
2430
return {"global_tvl": tvl}
2531

2632

2733
@tool()
2834
def show_defi_llama_chain_tvl(chain: str) -> Dict[str, Any]:
29-
"""Get TVL for a specific blockchain"""
35+
"""
36+
Get TVL for a specific chain
37+
"""
3038
tvl = defillama.get_chain_tvl(chain)
3139
return {"chain": chain, "tvl": tvl}
3240

3341

3442
@tool()
3543
def show_defi_llama_top_pools(chain: str = None, limit: int = 10, min_tvl: float = 500000, max_apy: float = 1000) -> List[Dict[str, Any]]:
36-
"""Get top DeFi pools ranked by APY with TVL filters
37-
38-
Args:
39-
chain: Filter by blockchain (e.g., Solana, Ethereum)
40-
limit: Maximum pools to return (default: 10)
41-
min_tvl: Minimum TVL in USD (default: 500k)
42-
max_apy: Maximum APY percentage (default: 1000%)
44+
"""
45+
Get top DeFi pools ranked by APY with TVL filters
4346
"""
4447
return defillama.get_top_pools(chain, limit, min_tvl, max_apy)
4548

4649

4750
@tool()
48-
def show_defi_llama_historical_global_tvl(num_months: int = 3) -> Dict[str, Any]:
49-
"""Get historical TVL data for all DeFi protocols
50-
51-
Args:
52-
num_months: Number of months of history (default: 3)
51+
def show_defi_llama_historical_global_tvl(num_months: int = 12) -> Dict[str, Any]:
52+
"""
53+
Get historical TVL data for all DeFi protocols
5354
"""
5455
return defillama.get_historical_global_tvl(num_months)
5556

5657

5758
@tool()
58-
def show_defi_llama_historical_chain_tvl(chain: str, num_months: int = 3) -> Dict[str, Any]:
59-
"""Get historical TVL data for a specific blockchain
60-
61-
Args:
62-
chain: Target blockchain name
63-
num_months: Number of months of history (default: 3)
59+
def show_defi_llama_historical_chain_tvl(chain: str, num_months: int = 12) -> Dict[str, Any]:
60+
"""
61+
Get historical TVL data for a specific blockchain
6462
"""
6563
return defillama.get_historical_chain_tvl(chain, num_months)

0 commit comments

Comments
 (0)