Make a loan rescue link
make_rescue_linkFor a wallet's Aave V4 stock loan on Base: a link that opens Afterbook's Aave panel with its rescue planner set to repay USDC or add collateral, at the price fall implied by Base's price now and a target health above your threshold. The link carries no amount and no wallet: the panel fills the Repay or Add field from the loan of the wallet the person connects, and they check it and sign. Returns null url with a reason for a wallet with no Aave loan (Morpho loans have no in-app panel). Reads public positions only; signs nothing.
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": {
"wallet": "<wallet>",
"action": "<action>"
},
"name": "make_rescue_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | repay = pay back USDC; add = post more of a stock already in the wallet as collateral. | |
| wallet | Yes | The borrower address. | |
| threshold | No | The health line to get back above (default 1.2). |