convert_wei_to_formatted
Convert wei amounts to human-readable format using token decimals for DeFi trading operations.
Instructions
Convert wei amounts to human-readable format using ethers.js
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": {
"amount": "<amount>",
"decimals": "<decimals>"
},
"name": "convert_wei_to_formatted"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount in wei (as string to handle large numbers) | |
| decimals | Yes | Number of decimal places for the token (e.g., 18 for ETH, 6 for USDC) |