Skip to main content
Glama

DeFi Trading Agent MCP Server

by edkdev

convert_wei_to_formatted

Convert wei values to human-readable token amounts using ethers.js for DeFi trading, specifying decimals to ensure accurate formatting for different cryptocurrencies.

Instructions

Convert wei amounts to human-readable format using ethers.js

Input Schema

NameRequiredDescriptionDefault
amountYesAmount in wei (as string to handle large numbers)
decimalsYesNumber of decimal places for the token (e.g., 18 for ETH, 6 for USDC)

Input Schema (JSON Schema)

{ "properties": { "amount": { "description": "Amount in wei (as string to handle large numbers)", "type": "string" }, "decimals": { "description": "Number of decimal places for the token (e.g., 18 for ETH, 6 for USDC)", "type": "integer" } }, "required": [ "amount", "decimals" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/edkdev/defi-trading-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server