@@ -39,36 +39,22 @@ def show_pools(pool_ids: List[str], config: RunnableConfig) -> Tuple[str, List]:
3939 return f"Showing pools to user: { pool_ids } " , pools
4040
4141
42- @tool ()
42+ @tool
4343def retrieve_pools (
44- tokens : List [str ] = None ,
45- protocols : List [str ] = None ,
46- is_stablecoin : bool = None ,
44+ token_addresses : List [str ] = None ,
4745 impermanent_loss_risk : bool = None ,
4846 config : RunnableConfig = None ,
4947) -> List [Pool ]:
50- """Retrieves pools matching the specified criteria for internal agent analysis.
51- This tool is for the agent to analyze pools without displaying them to the user.
52-
53- Args:
54- tokens: List of token addresses to filter by
55- protocols: List of protocol names to filter by
56- is_stablecoin: Whether to filter for stablecoin pools
57- impermanent_loss_risk: Whether to filter for pools with impermanent loss risk
58- config: The runnable config containing available pools
59-
60- Returns:
61- List of matching pools
48+ """
49+ Retrieves pools matching the specified criteria for analysis. token_addresses (if set) must be an address not a symbol.
6250 """
6351 configurable = config ["configurable" ]
6452 protocol_registry : ProtocolRegistry = configurable ["protocol_registry" ]
6553
6654 # Create a query to filter pools
6755 query = PoolQuery (
6856 chain = Chain .SOLANA , # Currently only supporting Solana
69- tokens = tokens or [],
70- protocols = protocols or [],
71- isStableCoin = is_stablecoin ,
57+ tokens = token_addresses or [],
7258 impermanentLossRisk = impermanent_loss_risk ,
7359 )
7460
0 commit comments