Skip to main content
Glama

DeFi Trading Agent MCP Server

by edkdev

convert_formatted_to_wei

Convert formatted Ethereum token amounts to wei for precise blockchain transactions, supporting custom decimals to ensure accurate token value representation.

Instructions

Convert formatted amounts to wei using ethers.js

Input Schema

NameRequiredDescriptionDefault
amountYesFormatted amount (e.g., '1.5' for 1.5 ETH)
decimalsYesNumber of decimal places for the token (e.g., 18 for ETH, 6 for USDC)

Input Schema (JSON Schema)

{ "properties": { "amount": { "description": "Formatted amount (e.g., '1.5' for 1.5 ETH)", "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