Skip to main content
Glama

evm_swap_order

evm_swap_order
Read-only

Best-price quote and ready-to-sign transaction for a token swap on Base (default), Ethereum, Arbitrum, Optimism, Polygon, BSC or Avalanche, routed by the KyberSwap aggregator across every major DEX. Tokens by symbol (ETH, WETH, USDC, USDT, DAI, cbBTC, AERO, DEGEN, VIRTUAL on Base) or contract address; amount in human units. With taker you get the exact transaction (to, data, value, gas) plus whether an ERC-20 approval is needed and the spender. Non-custodial. Price: $0.002 USDC per call (x402).

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": {
      "input": "<input>",
      "output": "<output>"
    },
    "name": "evm_swap_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNobase (default), ethereum, arbitrum, optimism, polygon, bsc or avalanche
inputYesToken to sell: symbol or contract address
takerNoWallet that signs and pays; omit for a quote only
amountNoAmount to sell in human units, e.g. 0.05 (or use amount_raw)
outputYesToken to buy: symbol or contract address
receiverNoWallet that receives the output token (default taker)
amount_rawNoAmount to sell in wei / base units
slippage_bpsNoMax slippage in basis points, 0-2000 (default 50)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations cover only readOnlyHint=true, and the description adds material context beyond that: non-custodial, a stated price of $0.002 USDC per call via x402, and the exact response contents (to, data, value, gas) including whether an ERC-20 approval is needed and the spender address. That is well past the annotation bar. It does not disclose failure behavior, quote expiry, or the fact that nothing is broadcast on-chain, leaving minor behavioral gaps.

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?

One dense, front-loaded paragraph that leads with what the tool produces and the chain scope, then layers in token input forms, taker behavior, and cost. Every clause carries information; the run-on sentence structure around the Base symbol list is the only mild cost to readability.

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

Completeness4/5

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

With no output schema, the description compensates well by enumerating returned fields and the approval/spender detail, and it discloses the x402 charge so the agent can budget. For an 8-parameter financial tool it is nearly complete; missing are error/timeout behavior and slippage or quote-validity caveats.

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

Parameters3/5

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

Schema description coverage is 100%, so every one of the 8 parameters is already documented, and the described defaults (base, 50 bps) are visible in the schema. The description adds real value by naming accepted token symbols per chain (ETH, WETH, USDC, cbBTC, AERO, DEGEN, VIRTUAL on Base) and by contrasting human units with amount_raw. That is modest enrichment over an already-complete schema, so a 3 is appropriate.

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?

States a specific verb and artifact: 'best-price quote and ready-to-sign transaction for a token swap', plus routing source (KyberSwap aggregator across major DEXes) and supported chains. Critically, it separates the two modes ('omit taker for a quote only'), which lets an agent distinguish this from the sibling evm_swap_execute without opening a schema.

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?

Explicitly defines the mode switch: supply 'taker' to get a signable transaction, omit it for a quote only. That is clear contextual guidance on when to use which behavior. It stops short of naming evm_swap_execute as the broadcast step, so an agent must infer the handoff rather than being routed to it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources