DeFi
The nine Uniswap API tools: a quote, an approval check, the swappable-token
The nine Uniswap API tools: a quote, an approval check, the swappable-token set, swap calldata, four LP position builders, and a token price.
get_swap_quote is the one an agent calls before every swap. It returns the raw
quote payload — gas estimates, the route, and, for a UniswapX route, the Permit2
payload to sign before the swap is called.
The four build_lp_* tools build calldata. None of them signs or sends.
get_contract_source_files
Fetch a verified contract's source files from Sourcify. Returns either a single file (when `filePath` is set, e.g. `contracts/Foo.sol`) or the full sources map (when `filePath` is omitted). The contract must already be verified on Sourcify; gate the call with `is_contract_verified` first — a 404 here means the contract is not on Sourcify and there are no files to return. The tool does not return the ABI or the compiler metadata; pull those with a Sourcify-specific call when a future caller needs them.
get_swap_quote
Get a swap quote from the Uniswap API. Translates the high-level `chain` argument to the numeric chain id the API expects, then POSTs to `/v1/quote` with the wallet, tokens, and amount. Returns the raw quote payload, including gas estimates, the route, and (for UniswapX routes) the Permit2 payload to sign before `/swap` is called. The most useful tool in the DeFi set: agents will call it before every swap.