Skip to main content
Glama

Swap Tokens (EVM)

monei_swap_tokens_evm
Destructive

Exchange tokens on EVM networks via Monei wallet. Supports native-to-ERC20, ERC20-to-ERC20, and ERC20-to-native swaps with automatic routing and slippage control.

Instructions

Swaps one token for another on an EVM network using the user's Monei wallet.

Routing is automatic based on which fields you provide:

  • No tokenIn + tokenOut provided → Native to ERC-20 (e.g. ETH → USDC)

  • tokenIn + tokenOut both provided → ERC-20 to ERC-20 (e.g. USDC → USDT)

  • tokenIn provided + no tokenOut → ERC-20 to Native (e.g. USDC → ETH)

Before calling:

  1. Confirm the user has sufficient balance using monei_get_evm_portfolio

  2. If the user doesn't know contract addresses, look them up from their portfolio token list

  3. Show the user what they are swapping and get confirmation before executing

Args:

  • amount (string): Amount to swap. Native-to-token: native amount (e.g. '0.1'). Token swaps: tokenIn amount.

  • chainId (number): Chain to swap on. 56=BSC, 137=Polygon, 8453=Base, 1=Ethereum, 42161=Arbitrum, 10=Optimism

  • tokenIn (string, optional): ERC-20 contract address of token to sell. Omit for native token sells.

  • tokenOut (string, optional): ERC-20 contract address of token to buy. Omit for native token buys.

  • slippageBps (number, optional): Slippage tolerance in basis points. Default 50 (0.5%).

Returns: { "txHash": string, // Transaction hash — can be checked on the block explorer "amount": string, "chainId": number, "route": string // Human-readable description of what was swapped }

Examples:

  • "Swap 0.1 ETH for USDC on Base" -> amount: "0.1", chainId: 8453, tokenOut: USDC contract

  • "Swap 100 USDC for USDT on BSC" -> amount: "100", chainId: 56, tokenIn: USDC contract, tokenOut: USDT contract

  • "Swap 50 USDC for BNB" -> amount: "50", chainId: 56, tokenIn: USDC contract, no tokenOut

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount to swap as a string. For native-to-token swaps this is the native amount (e.g. '0.1' ETH). For token swaps this is the tokenIn amount.
chainIdYesChain to swap on. 56=BSC, 137=Polygon, 8453=Base, 1=Ethereum, 42161=Arbitrum, 10=Optimism
tokenInNoContract address of the token to sell. Omit if selling the native token (ETH, BNB, MATIC).
tokenOutNoContract address of the token to buy. Omit if buying the native token (ETH, BNB, MATIC).
slippageBpsNoSlippage tolerance in basis points. Default is 50 (0.5%). Max is 10000 (100%).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.3.1

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description is consistent with those. It adds useful behavioral context by explaining that the swap uses the user's Monei wallet, that routing is automatic based on provided fields, that user confirmation is required, and that a transaction hash is returned. This goes beyond the annotation flags without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the purpose and routing logic, followed by preconditions, Args, Returns, and Examples. The length is justified by the tool's complexity and lack of an output schema. However, the Args bullet list partly repeats information already in the input schema, and the chainId list in the description omits Scroll and Lisk, so it is not perfectly lean.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter mutating swap tool with no output schema, this description is complete: it specifies route rules, preconditions such as balance verification and user confirmation, slippage default, supported chains, return shape with txHash, and illustrative examples. An agent can determine how and when to call the tool without needing to guess.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful route-level parameter semantics: which fields to include for native-to-ERC20, ERC20-to-ERC20, and ERC20-to-native swaps, plus worked examples mapping natural-language requests to concrete parameter values. This is genuinely helpful, even though some Args text merely restates schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise statement of what the tool does: swap one token for another on an EVM network using the user's Monei wallet. The EVM specification in the name and title distinguishes it from the Solana swap sibling, and the three routing combinations clarify the operation beyond a simple tautology.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit pre-call guidance: check balance with monei_get_evm_portfolio, look up contract addresses from the portfolio, and get user confirmation before executing. It also explains exactly how to choose tokenIn/tokenOut fields based on the swap route. It does not explicitly say 'use monei_swap_tokens_solana for Solana', so it stops just short of fully naming alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

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/Mr-Money01/mcp-server'

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