Skip to main content
Glama

Leash

Prepare swap

elysium_prepare_swap

Builds (never signs) a swap: Elysium uses Uniswap v4 via Universal Router; HyperEVM uses the best HyperSwap V3 / Uniswap v3 quote with a Hyperliquid HYPE price check for HYPE/stablecoin pairs. Re-quotes, applies slippage, risk-checks and simulates. HyperEVM deviations above 3% warn and above 10% block preparation. Missing ERC-20 allowance returns approvals_required and exact-amount approval signing links, not a swap link. Elysium approvals use Permit2; HyperEVM approvals use the selected v3 router. Sign approvals, wait, then request the swap again. Chains: elysium (default), hyperevm, robinhood.

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": {
      "from": "<from>",
      "tokenIn": "<tokenIn>",
      "tokenOut": "<tokenOut>",
      "amountIn": "<amountIn>"
    },
    "name": "elysium_prepare_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromYes
chainNoelysium (default), hyperevm or robinhoodelysium
policyNo
tokenInYesHYPE (native), WHYPE, USDC or a token address; on Robinhood Chain ETH, WETH, USDG or an uppercase stock ticker
amountInYes
tokenOutYesHYPE (native), WHYPE, USDC or a token address; on Robinhood Chain ETH, WETH, USDG or an uppercase stock ticker
allowHooksNo
slippageBpsNo
deadlineMinutesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: it never signs, it re-quotes and simulates, deviation thresholds warn/block, missing allowance returns approvals_required with exact-amount approval links instead of a swap link, and approval target differs by chain (Permit2 vs the selected v3 router). These are exactly the side-effect and failure-mode details an agent needs before calling a non-read-only, non-idempotent tool, and nothing contradicts the annotations.

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?

Dense but front-loaded: the core purpose and the never-signs constraint come first, then modifiers, then the approval workflow. The trailing 'Chains: elysium (default), hyperevm, robinhood' repeats the schema enum and default, so a sentence is spent on already-structured data.

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 carries the return-shape burden and does so for the failure path (approvals_required plus approval signing links, explicitly not a swap link). It is largely complete for a complex multi-chain preparation tool, with the main gap being the semantics of the optional tuning parameters.

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

Parameters2/5

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

Schema description coverage is only 33% across 9 parameters, so the description is expected to compensate, but it only restates the chain list that already appears in the enum and default. Undocumented parameters such as slippageBps (bounds 1-500), deadlineMinutes, allowHooks, policy, and amountIn receive no explanation of units, defaults impact, or expected format.

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?

Opens with a specific verb+resource and a key constraint: 'Builds (never signs) a swap'. It names the exact routing per chain (Uniswap v4 via Universal Router on Elysium, HyperSwap V3 / Uniswap v3 on HyperEVM) and the supported chain set, so an agent can distinguish it from elysium_swap_quote and from the transfer/wrap siblings 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?

Gives concrete usage context: chain selection, the 3%/10% deviation warn/block thresholds, and an explicit recovery workflow ('Sign approvals, wait, then request the swap again'). It does not explicitly state when to prefer elysium_swap_quote over this tool, but the build-vs-quote split is strongly implied by 'Builds (never signs)' and 'Re-quotes'.

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