Skip to content

JustLend MCP Tool Catalog for AI Agents

Use this page when an AI agent must choose a JustLend MCP tool, inspect required parameters, compare read-only tools with write tools, or explain whether a workflow can sign and broadcast a TRON transaction.

This docs-local page wraps the generated catalog from the MCP repository so RAG systems can retrieve both routing context and the complete tool list in one chunk set.

High-value tool groups

User intent Prefer these MCP tools Safety class
Market list, APY, TVL, utilization get_supported_markets, get_market_data, get_all_markets Read-only
Wallet and account risk get_wallet_address, get_account_summary, get_balances Read-only / wallet read
Supply, borrow, repay, withdraw supply, borrow, repay, withdraw, withdraw_all, estimate_lending_energy Writes require HITL
sTRX staking get_strx_dashboard, get_strx_account, stake_trx_to_strx, unstake_strx, claim_strx_rewards Writes require HITL
Energy rental get_energy_rental_dashboard, calculate_energy_rental_price, rent_energy, return_energy_rental Writes require HITL

Chinese query aliases: “查询市场/APY/TVL” maps to market read tools; “查看我的仓位/健康度” maps to account summary; “帮我存款/借款/还款/赎回/质押/租能量” maps to write tools and must require explicit confirmation.


Generated MCP API List — @justlend/mcp-server-justlend v1.1.0

Machine-readable tool catalog (for offline routing). Auto-generated by scripts/gen-mcp-api-list.ts from the registerTool definitions + Zod inputSchema + MCP annotations in the source — do not edit by hand; after changing any tool run npx tsx scripts/gen-mcp-api-list.ts to regenerate.

Lets an AI agent plan tool routing offline without connecting to the server. Side-effect classes align with the AI-Agent documentation standard baseline (Safe / Network Read / Remote Write / Destructive).

Total tools: 96 | Protocol: MCP | Transport: stdio / HTTP(SSE)

Read-only tools: 58 | Write tools: 38 (of which marked destructive: 25)

⚠️ Tools marked 🔴 sign and broadcast TRON transactions that move real assets — the client MUST require human confirmation (HITL) before executing. 🟡 tools only change local wallet/network config or start an interaction. Private keys are managed encrypted by @bankofai/agent-wallet or signed via the TronLink browser wallet, and are never passed as tool arguments.


Wallet & Network (10)

get_wallet_address

Get Wallet Address
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: false - Description: Get the active wallet address. Returns browser wallet address if in browser mode, agent-wallet address if agent mode is selected, or a first-use wallet selection guide if no wallet mode has been chosen yet. - Params: none

list_wallets

List Wallets
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: false - Description: List all wallets configured in agent-wallet. Shows wallet IDs, types, active status, and addresses. - Params: none

set_active_wallet

Set Active Wallet
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: true · openWorld: false - Description: Set the active wallet by wallet ID. Use list_wallets to see available wallet IDs.

Param Type Required Default Description
walletId string The wallet ID to set as active

connect_browser_wallet

Connect Browser Wallet
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: false · openWorld: true - Description: Connect to a browser wallet (TronLink, TokenPocket) for signing transactions. RECOMMENDED: More secure than agent-wallet because private keys never leave your browser. This opens a browser window where the user must approve the connection. Tell the user to switch to their browser to approve. Blocks until the user acts or the request times out (5 min). After connecting, all write operations will use the browser wallet for signing.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Required TRON address (T...). If set, the user must connect this exact address.

set_wallet_mode

Set Wallet Mode
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: true · openWorld: false - Description: Switch wallet signing mode. 'browser' (recommended, more secure): uses TronLink in your browser — private keys never leave the browser. 'agent': uses encrypted key stored in ~/.agent-wallet/. Selecting agent mode for the first time will create an encrypted agent-wallet if needed. Browser mode requires connect_browser_wallet first.

Param Type Required Default Description
mode enum(browser agent)

get_wallet_mode

Get Wallet Mode
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: false - Description: Get the current wallet signing mode (browser, agent, or unset), connected address, and connection status. - Params: none

set_network

Set Global Network
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: true · openWorld: false - Description: Set the global default network used by all JustLend operations unless explicitly overridden.

Param Type Required Default Description
network string Network name (mainnet, nile).

get_network

Get Global Network
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: false - Description: Get the current global default network used by all JustLend operations. - Params: none

transfer_trx

Transfer TRX
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: false · openWorld: true - Description: Transfer TRX to another TRON address. Checks balance sufficiency (including gas) before sending. Typical cost: ~0 energy + ~270 bandwidth.

Param Type Required Default Description
to string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Recipient TRON address (Base58 T... format)
amount string (pattern /^\d+(.\d+)?$/) Amount of TRX to transfer (e.g. '1', '10.5')
network string Network. Default: mainnet

transfer_trc20

Transfer TRC20
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: false · openWorld: true - Description: Transfer TRC20 tokens to another TRON address. You can pass a token symbol (e.g. 'USDT', 'JST', 'wstUSDT') or a contract address. Symbol resolution uses the server's known TRON token registry and JustLend underlying-token mappings. Amount is in human-readable units (e.g. '100' for 100 USDT). Checks balance sufficiency before sending.

Param Type Required Default Description
to string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Recipient TRON address (Base58 T... format)
amount string (pattern /^\d+(.\d+)?$/) Amount to transfer in human-readable units (e.g. '100' for 100 USDT)
token string Token symbol (e.g. 'USDT', 'JST', 'SUN'). Preferred over tokenAddress.
tokenAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRC20 token contract address. Use 'token' parameter instead when possible.
network string Network. Default: mainnet

Market Data (13)

get_supported_networks

Get Supported Networks
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: false - Description: List all supported TRON networks for JustLend. - Params: none

get_supported_markets

Get Supported Markets
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: false - Description: List all available JustLend lending markets (jTokens) with their addresses and underlying assets.

Param Type Required Default Description
network string Network (mainnet, nile). Default: mainnet

get_market_data

Get Market Data
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get detailed market data for a specific JustLend market: supply/borrow APY, TVL, utilization, collateral factor, price, and status. Use jToken symbol like 'jUSDT' or 'jTRX'.

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT', 'jTRX') or jToken address
network string Network. Default: mainnet

get_all_markets

Get All Markets
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get overview data for ALL JustLend markets including supply APY, borrow APY, mining rewards APY, underlying staking yield, total supply APY, and TVL. Mining APY is calculated from on-chain supply mining programs (USDD/TRX dual mining, WBTC mining, etc.). totalSupplyAPY = base supply APY + underlying staking APY + mining APY.

Param Type Required Default Description
network string Network. Default: mainnet

get_protocol_summary

Get Protocol Summary
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get JustLend protocol-level info: Comptroller config, close factor, liquidation incentive, total markets.

Param Type Required Default Description
network string Network. Default: mainnet

get_account_summary

Get Account Summary
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a comprehensive view of a user's JustLend positions (supply, borrow, health factor). IMPORTANT: Returns a snapshot tied to a specific block. You MUST call this again after any transaction (supply, withdraw, etc.) to get updated balances and health factor.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address (Base58 T... format) to check. Leave empty to use configured wallet.
network string Network. Default: mainnet

check_allowance

Check Allowance
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Check if the underlying TRC20 token has been approved for a jToken market. Must be approved before supply() or repay() for TRC20 markets. Not needed for jTRX. The returned 'allowance' is in human-readable token units (e.g. '1' means 1 USDT, not 1 raw unit). Compare it directly with the amount the user wants to supply/repay. 'allowanceUnit' indicates the token symbol.

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT')
amount string (pattern /^\d+(.\d+)?$/) Amount to check sufficiency against (human-readable, e.g. '0.5'). If provided, returns whether allowance is sufficient.
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Address to check. Default: configured wallet
network string Network. Default: mainnet

get_trx_balance

Get TRX Balance
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get TRX balance for an address.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
network string Network. Default: mainnet

get_token_balance

Get Token Balance
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get TRC20 token balance for an address. You can pass either a token symbol (e.g. 'USDD', 'USDT', 'ETH') or a contract address. When using a symbol, it resolves to the correct contract address from JustLend markets automatically. IMPORTANT: Always prefer using token symbols over raw addresses to avoid using outdated/wrong contract addresses. For example, use 'USDD' instead of a raw address — the old USDD (TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn) is deprecated. The returned balance is already formatted in human-readable token units (decimals already applied). Do NOT divide the balance by decimals again.

Param Type Required Default Description
token string Token symbol (e.g. 'USDD', 'USDT', 'TRX', 'ETH', 'BTC', 'SUN', 'JST', 'WIN', 'BTT', 'NFT', 'TUSD', 'WBTC', 'USD1', 'wstUSDT', 'sTRX'). Preferred over tokenAddress.
tokenAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRC20 token contract address. Use 'token' parameter with a symbol name instead when possible.
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
network string Network. Default: mainnet

get_wallet_balances

Get Wallet Token Balances (Batch)
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Batch-fetch TRC20 token balances for a wallet across multiple JustLend markets in a single RPC call using the Multicall3 walletTokensBalance method. Returns human-readable balances (decimals already applied) for all specified tokens at once. Use this instead of calling get_token_balance repeatedly when you need balances for several tokens.

Param Type Required Default Description
tokens string[] List of token symbols to check (e.g. ['USDT', 'USDD', 'ETH', 'BTC']). Defaults to all TRC20 underlying tokens across all JustLend markets.
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON wallet address. Default: configured wallet
network string Network. Default: mainnet

get_mining_rewards

Get Mining Rewards
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get mining rewards for supply markets (USDD, WBTC, etc.). Returns unclaimed rewards, mining APY, and reward breakdown from API.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Leave empty to use configured wallet.
network string Network. Default: mainnet

get_usdd_mining_config

Get USDD Mining Config
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: false - Description: Get USDD mining configuration including mining periods, reward tokens (USDD/TRX dual mining), and schedule.

Param Type Required Default Description
network string Network. Default: mainnet

get_wbtc_mining_config

Get WBTC Mining Config
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: false - Description: Get WBTC mining configuration and supply mining activity details. - Params: none

Lending Operations (10)

supply

Supply Assets
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Supply (deposit) assets into a JustLend market to earn interest. For TRC20 markets, you must first call approve_underlying. For jTRX, TRX is sent directly. Returns a jToken balance representing your deposit. Typical cost: ~100,000 energy + ~310 bandwidth for TRC20, ~80,000 energy + ~280 bandwidth for TRX. Use estimate_lending_energy tool for precise estimates before executing.

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT', 'jTRX')
amount string (pattern /^\d+(.\d+)?$/) Amount of underlying to supply (e.g. '1000' for 1000 USDT)
network string Network. Default: mainnet

withdraw

Withdraw Assets
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Withdraw (redeem) supplied assets from a JustLend market. Specify the amount in underlying units. May fail if assets are used as collateral for active borrows. Typical cost: ~90,000 energy + ~300 bandwidth.

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT', 'jTRX')
amount string (pattern /^\d+(.\d+)?$/) Amount of underlying to withdraw (e.g. '500')
network string Network. Default: mainnet

withdraw_all

Withdraw All
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Withdraw ALL supplied assets from a JustLend market by redeeming all jTokens. Typical cost: ~90,000 energy + ~300 bandwidth.

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT')
network string Network. Default: mainnet

borrow

Borrow Assets
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Borrow assets from a JustLend market against your collateral. You must have entered a market as collateral (enter_market) and have sufficient liquidity. Check your account_summary and health_factor before borrowing. Typical cost: ~100,000 energy + ~313 bandwidth.

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT', 'jTRX')
amount string (pattern /^\d+(.\d+)?$/) Amount of underlying to borrow (e.g. '500')
network string Network. Default: mainnet

repay

Repay Borrow
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Repay borrowed assets to a JustLend market. For TRC20 markets, must have approved underlying first. Use amount='max' to repay the full outstanding borrow. Typical cost: 80,00090,000 energy + 280320 bandwidth (TRX costs less than TRC20).

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT', 'jTRX')
amount string (pattern /^(\d+(.\d+)? max)$/)
network string Network. Default: mainnet

enter_market

Enter Market (Enable Collateral)
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: true · openWorld: true - Description: Enable a jToken market as collateral. Required before borrowing against supplied assets. Once entered, your supply in this market counts towards your borrowing capacity. Typical cost: ~80,000 energy + ~300 bandwidth.

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT', 'jTRX')
network string Network. Default: mainnet

exit_market

Exit Market (Disable Collateral)
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Disable a jToken market as collateral. Pre-checks: 1) market must have no outstanding borrows; 2) remaining collateral must still cover all borrows. Typical cost: ~50,000 energy + ~280 bandwidth.

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT')
network string Network. Default: mainnet

approve_underlying

Approve Underlying Token
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: true · openWorld: true - Description: Approve the jToken contract to spend your underlying TRC20 tokens. Required before supply() or repay() for TRC20-backed markets (not needed for jTRX). Pass the EXACT amount you intend to use (recommended). Pass amount='max' for unlimited approval ONLY when the user explicitly opts in — it lets the jToken contract spend the user's entire balance, present and future, until revoked. Typical cost: ~23,000 energy + ~265 bandwidth.

Param Type Required Default Description
market string jToken symbol (e.g. 'jUSDT')
amount string (pattern /^(\d+(.\d+)? max)$/)
network string Network. Default: mainnet

claim_rewards

Claim Rewards
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: false · openWorld: true - Description: Claim accrued JustLend mining rewards for the configured wallet. Typical cost: ~60,000 energy + ~330 bandwidth.

Param Type Required Default Description
network string Network. Default: mainnet

estimate_lending_energy

Estimate Operation Resources
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Estimate energy, bandwidth, and TRX cost for any JustLend operation BEFORE executing it. Covers ALL operations: supply, withdraw, withdraw_all, borrow, repay, approve, enter_market, exit_market, claim_rewards. Tries on-chain simulation first; falls back to historical typical values if simulation fails. Returns per-step breakdown (e.g. approve + mint for supply), total energy, total bandwidth, and estimated TRX cost. For supply/repay: automatically checks current allowance — if sufficient, the approve step is skipped. For approve: supports custom spender address (not just jToken). Use this tool whenever the user asks about gas/energy/cost for any lending operation.

Param Type Required Default Description
operation enum(supply withdraw withdraw_all borrow
market string jToken symbol (e.g. 'jUSDT', 'jTRX', 'jUSDD'). Required for all operations except claim_rewards.
amount string (pattern /^\d+(.\d+)?$/) Amount in underlying token units (e.g. '100'). Default: '1'. Not needed for enter_market, exit_market, approve, withdraw_all, claim_rewards.
spender string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Custom spender address for approve operation. Default: jToken contract address. Only used when operation is 'approve'.
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address for simulation. Default: configured wallet
network string Network. Default: mainnet

JST Voting / Governance (10)

get_proposal_list

Get Proposal List
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get the list of JustLend DAO governance proposals. Returns proposals with their status (Active, Passed, Defeated, etc.), vote counts, and details. Sorted by newest first.

Param Type Required Default Description
network string Network. Default: mainnet
limit number Max number of proposals to return. Default: 10. Use 0 for all.

get_user_vote_status

Get User Vote Status
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's voting status across all governance proposals. Shows which proposals the user has voted on, their vote amounts (for/against/abstain), and which proposals have withdrawable votes.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
network string Network. Default: mainnet

get_vote_info

Get Vote Info
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get voting power info for a user: JST wallet balance, available (surplus) votes, total deposited votes, and votes currently cast in proposals. This is the key tool to check before voting — it shows how many votes are available to use.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
network string Network. Default: mainnet

get_locked_votes

Get Locked Votes
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get the number of votes a user has locked in a specific proposal.

Param Type Required Default Description
proposalId number The proposal ID to check
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
network string Network. Default: mainnet

check_jst_allowance_for_voting

Check JST Voting Allowance
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Check if JST has been approved for the WJST voting contract. Must be approved before depositing JST to get votes.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
network string Network. Default: mainnet

approve_jst_for_voting

Approve JST for Voting
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: true · openWorld: true - Description: Approve JST token for the WJST voting contract. Required before depositing JST to get voting power. Pass the EXACT amount you intend to deposit (recommended). Pass amount='max' for unlimited approval ONLY when the user explicitly opts in — it lets the WJST contract spend the user's entire JST balance, present and future, until revoked.

Param Type Required Default Description
amount string (pattern /^(\d+(.\d+)? max)$/)
network string Network. Default: mainnet

deposit_jst_for_votes

Deposit JST for Votes
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Deposit JST into the WJST contract to get voting power. Requires prior approval of JST for the WJST contract (use approve_jst_for_voting first). 1 JST = 1 Vote. Deposited JST can be withdrawn back after voting.

Param Type Required Default Description
amount string (pattern /^\d+(.\d+)?$/) Amount of JST to deposit (e.g. '1000')
network string Network. Default: mainnet

withdraw_votes_to_jst

Withdraw Votes to JST
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Withdraw WJST back to JST. Can only withdraw votes that are not currently locked in active proposals. Use get_vote_info to check your surplus (available) votes before withdrawing.

Param Type Required Default Description
amount string (pattern /^\d+(.\d+)?$/) Amount of votes/WJST to withdraw back to JST (e.g. '1000')
network string Network. Default: mainnet

cast_vote

Cast Vote
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Cast a vote on a governance proposal. You must have available votes (deposit JST first if needed). Support: true = vote FOR, false = vote AGAINST. You can add more votes to a proposal you already voted on.

Param Type Required Default Description
proposalId number The proposal ID to vote on
support boolean true = vote FOR the proposal, false = vote AGAINST
votes string (pattern /^\d+(.\d+)?$/) Amount of votes to cast (e.g. '1000')
network string Network. Default: mainnet

withdraw_votes_from_proposal

Withdraw Votes from Proposal
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Withdraw (reclaim) votes from a completed or canceled proposal. Only works for proposals that are no longer active. After withdrawing, the votes become available again for other proposals or can be converted back to JST.

Param Type Required Default Description
proposalId number The proposal ID to withdraw votes from
network string Network. Default: mainnet

Energy Rental (9)

get_energy_rental_dashboard

Energy Rental Dashboard
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get JustLend energy rental market dashboard data including TRX price, exchange rate, total APY, energy per TRX, total supply, and other market parameters.

Param Type Required Default Description
network string Network. Default: mainnet

get_energy_rental_params

Energy Rental Parameters
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get on-chain energy rental parameters: liquidation threshold, fee ratio, min fee, total delegated/frozen TRX, max rentable amount, rent paused status, usage charge ratio.

Param Type Required Default Description
network string Network. Default: mainnet

calculate_energy_rental_price

Calculate Energy Rental Price
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: false · openWorld: true - Description: Calculate the cost to rent a specific amount of energy for a given duration. Returns TRX amount needed, rental rate, fee, total prepayment, security deposit, and daily cost. For NEW rentals: provide energyAmount and durationHours. For RENEWALS: provide energyAmount and receiverAddress. The tool auto-detects existing rentals and calculates the incremental cost (subtracting existing security deposit). durationHours is optional for renewals (defaults to 0 = no additional time).

Param Type Required Default Description
energyAmount number (min 50000) Amount of energy to rent (minimum 300,000 for new rental, minimum 50,000 for renewal)
durationHours number (min 0) Rental duration in hours. Required for new rentals (minimum 1). Optional for renewals (default 0 = no additional time).
receiverAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Receiver address. If provided, checks for existing rental to calculate renewal cost.
network string Network. Default: mainnet

get_energy_rental_rate

Energy Rental Rate
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: false · openWorld: true - Description: Get the current energy rental rate for a given TRX amount. Returns rental rate, stable rate, and effective rate (max of both).

Param Type Required Default Description
trxAmount number (min 0) TRX amount to check rate for (0 for base rate)
network string Network. Default: mainnet

get_user_energy_rental_orders

User Energy Rental Orders
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: false · openWorld: true - Description: Get a user's energy rental orders from JustLend. Can filter by role: 'renter' (orders where user is renting out), 'receiver' (orders where user receives energy), or 'all'.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Address to query. Default: configured wallet
type enum(renter receiver all)
page number Page number (0-indexed). Default: 0
pageSize number Results per page. Default: 10
network string Network. Default: mainnet

get_energy_rent_info

Energy Rent Info
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: false · openWorld: true - Description: Get on-chain energy rental info for a specific renter-receiver pair. Returns security deposit, rent balance, and whether an active rental exists.

Param Type Required Default Description
renterAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Renter address. Default: configured wallet
receiverAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Receiver address
network string Network. Default: mainnet

get_return_rental_info

Return Rental Info
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: false · openWorld: true - Description: Get estimated refund info for returning/canceling an energy rental. Shows how much TRX would be refunded (estimatedRefundTrx), remaining rent, security deposit, usage rental cost, unrecovered energy, and daily rent cost.

Param Type Required Default Description
renterAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Renter address. Default: configured wallet
receiverAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Receiver address
network string Network. Default: mainnet

rent_energy

Rent Energy
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Rent energy from JustLend for a specified receiver address. Automatically calculates TRX needed based on energy amount. For NEW rentals: durationHours is required (minimum 1 hour), minimum energy is 300,000. For RENEWALS (existing active rental to the same receiver): durationHours is NOT needed — the remaining duration from the existing order is used automatically. Minimum energy for renewal is 50,000. Pre-checks: rental not paused, amount within limits, sufficient TRX balance.

Param Type Required Default Description
receiverAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Address that will receive the energy
energyAmount number (min 50000) Amount of energy to rent (minimum 300,000 for new rental, minimum 50,000 for renewal)
durationHours number (min 1) Rental duration in hours (minimum 1 hour). Required for new rentals. Ignored for renewals (uses existing order's remaining duration).
network string Network. Default: mainnet

return_energy_rental

Return Energy Rental
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Return (cancel) an active energy rental. As a renter, provide the receiver address. As a receiver, provide the renter address. Pre-checks: active rental must exist between the two addresses.

Param Type Required Default Description
counterpartyAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) The other party's address (receiver if you are renter, renter if you are receiver)
endOrderType enum(renter receiver)
network string Network. Default: mainnet

sTRX Staking (7)

get_strx_dashboard

sTRX Dashboard
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get sTRX staking dashboard data including TRX price, sTRX/TRX exchange rate, total APY, vote APY, total supply, unfreeze delay days, and energy stake per TRX.

Param Type Required Default Description
network string Network. Default: mainnet

get_strx_account

sTRX Account Info
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: false · openWorld: true - Description: Get user's sTRX staking account info including staked amount, income, claimable rewards, withdrawn amount, and rental energy amount.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Address to query. Default: configured wallet
network string Network. Default: mainnet

get_strx_balance

sTRX Balance
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: false · openWorld: true - Description: Get the sTRX token balance for an address.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Address to check. Default: configured wallet
network string Network. Default: mainnet

check_strx_withdrawal_eligibility

Check sTRX Withdrawal Eligibility
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: false · openWorld: true - Description: Check if user has TRX available to withdraw after sTRX unstaking unbonding period. Shows staked amount, claimable rewards, pending/completed unstake rounds, and withdrawal status.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Address to check. Default: configured wallet
network string Network. Default: mainnet

stake_trx_to_strx

Stake TRX to sTRX
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Stake TRX via JustLend to receive sTRX tokens. sTRX earns staking rewards (vote APY + energy rental income). Pre-checks: sufficient TRX balance for staking amount + gas.

Param Type Required Default Description
amount string (pattern /^\d+(.\d+)?$/) Amount of TRX to stake (human-readable decimal string, e.g. '1' or '10.5')
network string Network. Default: mainnet

unstake_strx

Unstake sTRX
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Unstake sTRX to receive TRX back. Note: unstaked TRX has an unbonding period (typically 14 days) before withdrawal. Pre-checks: sufficient sTRX balance.

Param Type Required Default Description
amount string (pattern /^\d+(.\d+)?$/) Amount of sTRX to unstake (human-readable decimal string, e.g. '1' or '10.5')
network string Network. Default: mainnet

claim_strx_rewards

Claim sTRX Rewards
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Claim all available sTRX staking rewards. Pre-checks: verifies there are claimable rewards before executing.

Param Type Required Default Description
network string Network. Default: mainnet

JustLend V2 — Vaults (6)

get_moolah_vaults

Get V2 Vaults
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: List all JustLend V2 vaults with APY, TVL, and underlying token. Vaults are ERC4626 — deposit tokens to earn auto-compounding yield allocated across V2 markets.

Param Type Required Default Description
depositToken string Filter by deposit token symbol (e.g. 'USDT', 'TRX')
network string Network. Default: mainnet

get_moolah_vault

Get V2 Vault
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get detailed info for a single V2 vault: APY, TVL, allocation, and the user's share balance if address is provided. vaultSymbol is 'TRX', 'USDT', or 'USDD'.

Param Type Required Default Description
vaultSymbol string Vault symbol: 'TRX', 'USDT', or 'USDD'
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) User address to include share balance. Default: configured wallet
network string Network. Default: mainnet

approve_moolah_vault

Approve V2 Vault
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: true · openWorld: true - Description: Approve TRC20 token spending for a V2 vault before depositing. Not needed for TRX vaults. Pass the EXACT amount you intend to deposit (recommended). Pass amount='max' for unlimited approval ONLY when the user explicitly opts in — it lets the vault contract spend the user's entire balance, present and future, until revoked (amount='0').

Param Type Required Default Description
vaultSymbol string Vault symbol: 'USDT' or 'USDD'
amount string (pattern /^(\d+(.\d+)? max)$/)
network string Network. Default: mainnet

moolah_vault_deposit

V2 Vault Deposit
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Deposit assets into a V2 ERC4626 vault to earn yield. For TRC20 vaults (USDT, USDD), call approve_moolah_vault first. Returns vault shares representing your deposit.

Param Type Required Default Description
vaultSymbol string Vault symbol: 'TRX', 'USDT', or 'USDD'
amount string Amount of underlying to deposit (e.g. '1000' for 1000 USDT)
network string Network. Default: mainnet

moolah_vault_withdraw

V2 Vault Withdraw
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Withdraw underlying assets from a V2 vault by specifying the asset amount. Use amount='max' to withdraw everything. No approval needed.

Param Type Required Default Description
vaultSymbol string Vault symbol: 'TRX', 'USDT', or 'USDD'
amount string Amount of underlying to withdraw, or 'max' for full withdrawal
network string Network. Default: mainnet

moolah_vault_redeem

V2 Vault Redeem
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Redeem vault shares to receive underlying assets. Use shares='max' to redeem all shares. No approval needed.

Param Type Required Default Description
vaultSymbol string Vault symbol: 'TRX', 'USDT', or 'USDD'
shares string Number of shares to redeem, or 'max' for all shares
network string Network. Default: mainnet

JustLend V2 — Markets (8)

get_moolah_markets

Get V2 Markets
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: List JustLend V2 markets with borrow/supply APY, LLTV, utilization, and liquidity. Markets are isolated — each has its own loan token, collateral token, oracle, and LLTV.

Param Type Required Default Description
depositToken string Filter by loan token symbol (e.g. 'USDT')
collateralToken string Filter by collateral token symbol (e.g. 'TRX')
pageSize number Max results. Default: 20
network string Network. Default: mainnet

get_moolah_market

Get V2 Market
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get full details for a single V2 market by its marketId (bytes32 hex). Includes APY, LLTV, utilization, total supply/borrow, and vaults supplying to this market. Use get_moolah_markets to find marketIds.

Param Type Required Default Description
marketId string Market ID (bytes32 hex, e.g. '0xabc...')
network string Network. Default: mainnet

get_moolah_user_position

Get V2 User Position
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's position in a specific V2 market: collateral, borrow amount, lltv, and risk ratio. risk close to 1.0 means the position is near liquidation — consider repaying or adding collateral.

Param Type Required Default Description
marketId string Market ID (bytes32 hex)
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) User address. Default: configured wallet
network string Network. Default: mainnet

approve_moolah_proxy

Approve V2 Proxy
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: true · openWorld: true - Description: Approve TRC20 token spending for the V2 core contract before supplying collateral or repaying. Not needed for TRX operations. Pass the EXACT amount you intend to use (recommended). Pass amount='max' for unlimited approval ONLY when the user explicitly opts in — it lets the V2 proxy spend the user's entire balance, present and future, until revoked (amount='0').

Param Type Required Default Description
tokenAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRC20 contract address (Base58)
tokenSymbol string Token symbol for display (e.g. 'USDT')
tokenDecimals number Token decimals (e.g. 6 for USDT)
amount string (pattern /^(\d+(.\d+)? max)$/)
network string Network. Default: mainnet

moolah_supply_collateral

V2 Supply Collateral
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Supply collateral into a V2 market to enable borrowing. For TRC20 collateral, call approve_moolah_proxy first. For TRX collateral, TRX is sent directly with no prior approval.

Param Type Required Default Description
marketId string Market ID (bytes32 hex) — from get_moolah_markets
amount string Amount of collateral to supply (e.g. '10000' for 10000 TRX)
network string Network. Default: mainnet

moolah_withdraw_collateral

V2 Withdraw Collateral
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Withdraw collateral from a V2 market. Use amount='max' to withdraw all collateral (only allowed when no active borrows). Withdrawing too much while borrowing will revert — check health factor first.

Param Type Required Default Description
marketId string Market ID (bytes32 hex)
amount string Amount of collateral to withdraw, or 'max' for all (requires no active borrows)
network string Network. Default: mainnet

moolah_borrow

V2 Borrow
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Flexible V2 borrow entry point. Provide collateralAmount only → supply collateral without borrowing. Provide borrowAmount only → borrow against existing collateral. Provide both → supply collateral then borrow in two sequential transactions. Collateral must cover the borrow at the market's LLTV or the borrow tx reverts.

Param Type Required Default Description
marketId string Market ID (bytes32 hex) — from get_moolah_markets
collateralAmount string Collateral to supply first (e.g. '10000' TRX). Omit to skip.
borrowAmount string Loan token amount to borrow (e.g. '500' USDT). Omit to skip.
network string Network. Default: mainnet

moolah_repay

V2 Repay
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Repay a V2 market loan. Use amount='max' to repay the full outstanding borrow (uses shares math for exact settlement). For TRC20 loan tokens, call approve_moolah_proxy first. For TRX loans, TRX is sent directly.

Param Type Required Default Description
marketId string Market ID (bytes32 hex)
amount string Loan amount to repay, or 'max' for full repayment
network string Network. Default: mainnet

JustLend V2 — Liquidation (5)

get_moolah_pending_liquidations

Get Pending Liquidations
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: List V2 positions eligible or approaching liquidation. riskLevel > 1.0 means the position is liquidatable right now. Use minRiskLevel=0.9 to find positions near the threshold.

Param Type Required Default Description
minRiskLevel number Minimum risk level (e.g. 0.9 for near-liquidatable, 1.0 for liquidatable now)
maxRiskLevel number Maximum risk level filter
debtToken string Filter by loan token symbol (e.g. 'USDT')
collateralToken string Filter by collateral token symbol (e.g. 'TRX')
page number Page number (0-indexed). Default: 0
pageSize number Results per page. Default: 20
network string Network. Default: mainnet

get_moolah_liquidation_quote

Get Liquidation Quote
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Estimate the loan token cost to liquidate a position. Provide either seizedAssets (collateral to take) OR repaidShares (borrow shares to repay), not both. Returns the exact loan token amount needed. Use this before calling moolah_liquidate.

Param Type Required Default Description
marketId string Market ID (bytes32 hex)
seizedAssets string Collateral amount to seize (raw units). Provide this OR repaidShares.
repaidShares string Borrow shares to repay (raw units). Provide this OR seizedAssets.
network string Network. Default: mainnet

get_moolah_liquidation_records

Get Liquidation Records
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Historical liquidation events on V2 — both bot-executed and public liquidations.

Param Type Required Default Description
type enum(bot public)
debtToken string Filter by loan token symbol
collateralToken string Filter by collateral token symbol
page number Page number (0-indexed). Default: 0
pageSize number Results per page. Default: 20
network string Network. Default: mainnet

moolah_liquidate

V2 Liquidate
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Liquidate an undercollateralized V2 position. You must hold the loan token and have approved it via approve_liquidator_token. Provide EITHER seizedAssets (collateral to seize) OR repaidShares (borrow shares to repay), not both. Use get_moolah_liquidation_quote first to estimate the required loan token amount.

Param Type Required Default Description
marketId string Market ID (bytes32 hex)
borrower string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Address of the borrower to liquidate (Base58)
seizedAssets string Collateral units to seize (raw). Provide this OR repaidShares.
repaidShares string Borrow shares to repay (raw). Provide this OR seizedAssets.
network string Network. Default: mainnet

approve_liquidator_token

Approve Liquidator Token
- Side effect: 🟡 State-changing (Write) — changes local wallet/network config or starts an interaction; client should confirm - annotations: idempotent: true · openWorld: true - Description: Approve loan token spending for the V2 public liquidator contract. Required before calling moolah_liquidate. Pass the EXACT amount you intend to use (recommended). Pass amount='max' for unlimited approval ONLY when the user explicitly opts in — it lets the liquidator contract spend the user's entire balance, present and future, until revoked (amount='0').

Param Type Required Default Description
tokenAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Loan token contract address (Base58)
tokenSymbol string Token symbol for display (e.g. 'USDT')
tokenDecimals number Token decimals (e.g. 6 for USDT)
amount string (pattern /^(\d+(.\d+)? max)$/)
network string Network. Default: mainnet

JustLend V2 — Dashboard & History (6)

get_moolah_dashboard

Get V2 Dashboard
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: JustLend V2 protocol overview: top vaults (APY, TVL) and top markets (borrow/supply rates). If address is provided, also includes the user's aggregated V2 position (total supply, borrow, health factor).

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) User address to include V2 position summary. Default: configured wallet
depositToken string Filter vaults and markets by deposit token symbol
collateralToken string Filter markets by collateral token symbol
network string Network. Default: mainnet

get_moolah_history

Get V2 History
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's JustLend V2 position history (net worth, supply, borrow over time) and recent transaction records (supply, borrow, repay, etc.).

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) User address. Default: configured wallet
timeFilter enum(ONE_DAY ONE_WEEK ONE_MONTH)
network string Network. Default: mainnet

get_moolah_records

Get V2 Records
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's paginated V2 transaction history — supply, withdraw, borrow, repay, liquidate events. Distinct from get_moolah_history (which returns position curves + a small recent-txs preview) — this one is the full paginated record list. Works on both mainnet and nile.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) User address. Default: configured wallet
pageNo number Page number, 1-indexed. Default: 1
pageSize number Records per page. Default: 20
network string Network. Default: mainnet

get_moolah_vault_history

Get V2 Vault History
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Time series of a V2 vault's APY, TVL, and supply mining data. Returns currentSupplyUsd, supplyBaseApy, supplyMiningApy, and a historyRecords array. Use vaultAddress from get_moolah_vaults or chains.ts vault map.

Param Type Required Default Description
vaultAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Vault contract address (Base58 T...)
network string Network. Default: mainnet

estimate_moolah_energy

Estimate V2 Energy
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Estimate energy, bandwidth, and TRX cost for a JustLend V2 write operation BEFORE executing it. Returns historical typical values (on-chain simulation for V2's tuple-args ops is not yet wired). Set isTRX=true when the underlying / loan / collateral token is native TRX (TrxProviderProxy route). Covers: vault_deposit, vault_withdraw, vault_redeem, approve_vault, supply_collateral, withdraw_collateral, borrow, repay, approve_proxy, liquidate, approve_liquidator.

Param Type Required Default Description
operation enum(vault_deposit vault_withdraw vault_redeem approve_vault
isTRX boolean Whether the route uses native TRX (via TrxProviderProxy). Default: false
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Owner address for resource-sufficiency check. Default: configured wallet
network string Network. Default: mainnet

get_moolah_market_history

Get V2 Market History
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Time series of a V2 market's borrow/supply APY, utilization, and totals. Returns current totalBorrow/totalCollateral + borrowApy/supplyApy + list[] of historical points. Use marketId (bytes32 hex) from get_moolah_markets.

Param Type Required Default Description
marketId string Market ID (bytes32 hex, e.g. '0xabc...')
network string Network. Default: mainnet

JustLend V2 — Mining, Rewards & Estimator (5)

get_moolah_vault_mining_apy

Get V2 Vault Mining APY
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get V2 mining APY for a single V2 vault. Returns the USDD / TRX APY split and total (encoded as a fraction, e.g. 0.123 = 12.3%). enabled=true means the vault is active in mining and qualifies for the fire-icon UI hint.

Param Type Required Default Description
vaultAddress string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Vault contract address (Base58 T...)
network string Network. Default: mainnet

get_moolah_mining_resolver

Get V2 Mining Resolver
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Map every V2 vault with active mining to its USDD / TRX APY split. Used by the dashboard to prefetch fire-icon eligibility in one round-trip. Vaults with zero mining APY are excluded from the response.

Param Type Required Default Description
network string Network. Default: mainnet

get_moolah_mining_accruing

Get V2 Mining Accruing
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's accruing & settling V2 mining rewards across vaults. accruingUsd = current round still emitting; settlingUsd = previous round in the brief settlement window (miningStatus=2, currRewardStatus=1) — excluded otherwise so it doesn't double-count with already-published merkle airdrops. globalSettlementStatus=true means the backend reports any token in flux; treat per-token amounts as provisional.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
network string Network. Default: mainnet

get_moolah_pending_mining_periods

Get V2 Pending Mining Periods
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's claimable V2 mining airdrop rounds (already settled and merkle-published). Each period includes merkleIndex, index, per-token amounts (raw + decimal-shifted), the merkle proof, and a USD total. Feed a periodKey directly into claim_moolah_mining_period to submit the on-chain multiClaim. Set includeClaimed=true to also return rounds the indexer marks as already claimed (default false matches the rewards card behaviour).

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
includeClaimed boolean Include rounds the backend marks as claimed. Default: false
network string Network. Default: mainnet

claim_moolah_mining_period

Claim V2 Mining Period
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Claim a single V2 mining airdrop round via multiClaim() on the V2 merkle distributor. Pass periodKey from get_moolah_pending_mining_periods (preferred) or supply merkleIndex / index / amounts / proof directly. Pre-checks isClaimed() and merkleRoots() on-chain so the wallet does not pay gas for a guaranteed-revert tx. Mainnet currently errors with 'distributor not configured' until the V2 contract ships — nile testnet works.

Param Type Required Default Description
periodKey string Round key from get_moolah_pending_mining_periods (preferred)
merkleIndex union Override: merkle tree index
index union Override: leaf index inside the tree
amounts union[] Override: token amounts in raw units, slot-aligned with the tree's tokenAddress[]
proof string[] Override: merkle proof (bytes32[])
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Owner address used to refetch the airdrop entry when periodKey is supplied. Default: signing wallet
network string Network. Default: mainnet

Historical Records (7)

get_lending_records

Get V1 Lending Records
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's V1 JustLend transaction history: supply, withdraw, borrow, repay, and collateral enable/disable. Paginated. Each record includes actionType (1-11), actionName (human-readable), token, amount, USD value, and txId. Mainnet-only.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address (T...). Default: configured wallet
page number Page number, 1-indexed. Default: 1
pageSize number Records per page. Default: 20
network string Must be 'mainnet'. Default: mainnet

get_strx_records

Get sTRX Records
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's sTRX staking history: stake, unstake, withdraw (after unbonding), and sTRX transfers. Each record has opType (1-6) and a human-readable opName. Paginated. Mainnet-only.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
page number Page number, 1-indexed. Default: 1
pageSize number Records per page. Default: 20
network string Must be 'mainnet'. Default: mainnet

get_vote_records

Get Vote Records
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's governance voting history: get_vote (JST → WJST deposits), votes cast for/against proposals, vote withdrawals, and JST conversions back. Each record has opType (1-6), opName, amount, and proposalId (for votes and withdrawals). Use get_user_vote_status for real-time current voting power. Mainnet-only.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
page number Page number, 1-indexed. Default: 1
pageSize number Records per page. Default: 20
network string Must be 'mainnet'. Default: mainnet

get_energy_rental_records

Get Energy Rental Records
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's JustLend energy-rental history: rent, extend, rent_more, end, recycle actions. Distinct from get_user_energy_rental_orders which returns current active on-chain orders — this one returns the full historical action log. Paginated. Mainnet-only.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
page number Page number, 1-indexed. Default: 1
pageSize number Records per page. Default: 20
network string Must be 'mainnet'. Default: mainnet

get_claimable_rewards

Get Claimable Rewards
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Scan all JustLend V1 merkle airdrop distributors for a user's unclaimed rewards. Returns a map keyed by round; each entry includes the merkleIndex, index, amount(s), token symbol/address, and proof. Feed any returned key into claim_v1_mining_period to submit the on-chain multiClaim. Mainnet-only.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
network string Must be 'mainnet'. Default: mainnet

claim_v1_mining_period

Claim V1 Mining Period
- Side effect: 🔴 On-chain write · high-risk (Remote Write / Destructive) — signs and broadcasts a TRON transaction moving real assets; the client MUST require human confirmation (HITL) before executing - annotations: idempotent: false · openWorld: true - Description: Claim a single V1 mining airdrop round via multiClaim() on the appropriate merkle distributor. Pass key from get_claimable_rewards (preferred) or supply merkleIndex / index / amount / proof directly. Routing matches the front-app: amount[] → multi-merkle distributor (multi-token leaf); single + USDD → USDDNEW distributor; single + other → main distributor. Mainnet-only.

Param Type Required Default Description
key string Round key from get_claimable_rewards (preferred)
merkleIndex union Override: merkle tree index
index union Override: leaf index inside the tree
amount union Override: token amount(s) in raw units; pass an array for multi-token leaves
proof string[] Override: merkle proof (bytes32[])
tokenAddress union Override: token address(es) used for routing when the entry is single-token
tokenSymbol union Override: token symbol(s); useful when tokenAddress is missing
distributor string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Force a specific distributor address. Set with selector to bypass routing.
selector enum(single multi)
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) Owner address used to refetch the airdrop entry when key is supplied. Default: signing wallet
network string Network. Default: mainnet

get_liquidation_records

Get V1 Liquidation Records
- Side effect: 🟢 Read-only (Safe / Network Read) - annotations: idempotent: true · openWorld: true - Description: Get a user's V1 JustLend liquidation history — both positions the user liquidated and positions where the user was liquidated. Distinct from get_moolah_liquidation_records which covers V2 liquidations. Paginated. Mainnet-only.

Param Type Required Default Description
address string (pattern /^T[1-9A-HJ-NP-Za-km-z]{33}$/) TRON address. Default: configured wallet
page number Page number, 1-indexed. Default: 1
pageSize number Records per page. Default: 20
network string Must be 'mainnet'. Default: mainnet

Auto-generated — do not edit by hand. Generator: scripts/gen-mcp-api-list.ts. Regenerate: npx tsx scripts/gen-mcp-api-list.ts.