Skip to main content
Glama
warengonzaga

Relay Protocol MCP Server

by warengonzaga

relay_swap_multi_input

Execute multi-chain token swaps by specifying origins from multiple chains and a destination chain. Supports exact input (fixed source amounts) or exact output (fixed destination amount). Use token contract addresses for currencies.

Instructions

Execute multi-chain token swaps. IMPORTANT: For EXACT_INPUT, do NOT include "amount" at root level - only in origins array. For EXACT_OUTPUT, include "amount" at root level. Always use TOKEN CONTRACT ADDRESSES. Examples:

EXACT_INPUT (Bridge 1 USDC from Ethereum to Optimism): {"user": "0x123...", "origins": [{"chainId": 1, "currency": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "amount": "1000000"}], "destinationChainId": 10, "destinationCurrency": "0x0b2c639c533813f4aa9d7837caf62653d097ff85", "tradeType": "EXACT_INPUT"}

EXACT_OUTPUT (Get exactly 100 USDC on Base): {"user": "0x123...", "amount": "100000000", "origins": [{"chainId": 1, "currency": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "amount": "50000000"}], "destinationChainId": 8453, "destinationCurrency": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "tradeType": "EXACT_OUTPUT"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userYesUser wallet address that will make deposits and receive tokens
originsYesArray of origin tokens to swap from multiple chains
destinationCurrencyYesDestination token contract address (e.g., "0x0b2c639c533813f4aa9d7837caf62653d097ff85" for USDC on Optimism)
destinationChainIdYesDestination chain ID (e.g., 10 for Optimism, 8453 for Base, 42161 for Arbitrum)
tradeTypeYesEXACT_INPUT: Use exact amounts from origins. EXACT_OUTPUT: Get exact amount at destination (requires "amount" field)
recipientNoOptional: recipient address (defaults to user address)
refundToNoOptional: refund address in case of failure
amountNoONLY for EXACT_OUTPUT: exact amount to receive at destination (in smallest unit)
txsNoOptional: additional transactions to execute
txsGasLimitNoGas limit for additional transactions
partialNoAllow partial fills if full amount not available
referrerNoReferrer address for fee sharing
gasLimitForDepositSpecifiedTxsNoGas limit for deposit-specified transactions
Behavior2/5

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

No annotations provided. Description does not disclose whether the tool is read-only or destructive, nor does it mention transaction costs, gas implications, or failure behavior. The examples imply it submits a transaction, but this is not explicitly stated.

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

Conciseness5/5

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

Well-structured: general description, important notes, then two clear examples. No wasted sentences; every part earns its place. Examples are concise yet informative.

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

Completeness3/5

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

Covers core swap logic but does not explain return value (e.g., transaction hash or status), error handling, or prerequisites (e.g., approvals, balance). With no output schema, this omission limits completeness for a complex tool.

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%, but description adds significant value by explaining the trade-type-specific parameter rules (amount placement) and providing complete examples. This clarifies ambiguous usage beyond the schema.

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?

Clearly states it executes multi-chain token swaps. Distinguishes from sibling tools like relay_get_quote and relay_get_chains, which are for querying or quoting, not execution.

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?

Provides explicit guidance on EXACT_INPUT vs EXACT_OUTPUT, including the crucial 'amount' field placement and token contract addresses. Lacks explicit alternatives or exclusions, but context from siblings implies this is for execution after quoting.

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

Install Server

Other Tools

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/warengonzaga/relay-protocol-mcp-server'

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