Skip to main content
Glama

MoneyTools x402 agent toolkit

Token swap / bridge quote (non-custodial)

swap_quote
Read-onlyIdempotent

Get a best-price token swap quote on one EVM chain (KyberSwap aggregator) or a cross-chain bridge quote (LI.FI, fallback Relay; set toChain). Returns expected and minimum output, price impact, gas, every fee, safety warnings and, if you pass taker, an UNSIGNED transaction (plus exact-amount ERC-20 approval) for your own wallet to sign. Quotes are free and unlimited. Fee disclosure: same-chain swaps include a 0.25% MoneyTools fee taken from the input on-chain only if you execute; cross-chain currently 0% MoneyTools fee. Never signs, holds funds or asks for keys.

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": {
      "chain": "<chain>",
      "fromToken": "<fromToken>",
      "toToken": "<toToken>"
    },
    "name": "swap_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYessource chain: ethereum, base, arbitrum, optimism, polygon, bsc, avalanche (or chain id)
takerNoyour 0x wallet address; needed for an unsigned transaction, omit for price only
amountNoamount to sell in human units, e.g. "10"
toChainNodestination chain for a bridge; omit for a same-chain swap
toTokenYestoken to buy: symbol or 0x address
fromTokenYestoken to sell: symbol (USDC, ETH, WETH, USDT, DAI...) or 0x address
recipientNoreceiver of output (default taker)
slippageBpsNomax slippage in bps, default 50
amountBaseUnitsNoamount in base units (integer); required for custom token addresses

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and destructiveHint=false, yet the description adds materially new behavioral facts: it never signs, holds funds, or asks for keys; execution is separate from quoting; same-chain swaps carry a 0.25% fee taken on-chain only on execution while cross-chain is currently 0%. It also discloses that taker returns an unsigned transaction plus an exact-amount ERC-20 approval, which the annotations cannot convey.

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?

It is front-loaded with purpose and provider, then layers mode selection, return contents, fees, and safety in a logical order with no filler clauses. It is dense and runs long as a single block, which slightly burdens scanning, but essentially every sentence carries information an agent needs.

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 9-parameter, open-world quoting tool with an output schema, the description covers the remaining gaps: providers, swap vs bridge selection, what gets returned, fee structure, and the non-custodial safety stance. Return-value detail is correctly left to the output schema.

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 coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: 'taker' is what produces an unsigned transaction and approval, and 'toChain' is the switch between swap and bridge modes. It does not add detail on slippageBps or amountBaseUnits beyond what the schema already documents.

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 specific verb and resource ('Get a best-price token swap quote'), names both modes (same-chain via KyberSwap, cross-chain via LI.FI/Relay) and the exact switch that selects between them ('set toChain'). This is enough for an agent to distinguish it from siblings such as list_swap_tokens or plan_buy without opening the 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?

It gives explicit conditional guidance: 'set toChain' for a bridge, omit for same-chain; pass 'taker' for an unsigned transaction, omit for price only. It also states quotes are free and unlimited, so there is no cost reason to avoid calling it. It stops short of explicitly stating when to prefer this over sibling tools like list_swap_tokens, which keeps it from a 5.

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