Skip to main content
Glama

Execute a swap

execute_swap

Execute exact-input single-hop swaps on Robinhood Chain using Uniswap v4. Dry-run mode returns plan without sending; real run enforces minAmountOut and uses Permit2 approvals.

Instructions

Execute an exact-input single-hop swap through Robinhood Chain's Uniswap v4 UniversalRouter (no deployed contract needed). SAFETY: dryRun defaults to true (returns the plan + which Permit2 approvals a real run would send, without sending); amountIn is capped by RHC_MAX_SWAP_AMOUNT; a real minAmountOut is always enforced (from the arg or a fresh quote minus slippageBps). ERC-20 input flows through Permit2. Output is taken to the signer. Requires RHC_PRIVATE_KEY to actually send.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feeNopool fee (default 3000)
dryRunNodefault true; set false to actually send the transaction
tokenInYesinput token symbol or 0x address
amountInYeshuman-readable input amount
tokenOutYesoutput token symbol or 0x address
recipientNomust equal the signer if given; output is always taken to the signer
slippageBpsNoslippage tolerance in bps when minAmountOut omitted (default 50 = 0.5%)
tickSpacingNopool tick spacing (default 60)
minAmountOutNoexplicit minimum output (human units); overrides slippageBps
Behavior5/5

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

No annotations, so description fully covers behavior: dryRun safety, amountIn cap, minAmountOut enforcement via slippageBps or explicit, Permit2 flow, output to signer, and private key requirement for actual send. Highly transparent.

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?

Concise and well-structured. Main action in first sentence, safety details in bullet-style paragraph. No wasted words. Front-loaded with core purpose.

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?

No output schema, but description explains return behavior (plan for dry run, transaction for real). Covers all key aspects: inputs, safety, requirements, and result. Complete for a complex swap 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%, baseline 3. Description adds value by explaining dryRun default and safety, amountIn cap, slippageBps default, and recipient restriction, beyond 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?

Clearly states it executes an exact-input single-hop swap via Uniswap v4 UniversalRouter. Distinguishes from siblings (rhc_info, get_positions, quote_swap) by focusing on execution rather than info or quoting.

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 when to use (executing a swap) and key safety guidelines (dryRun defaults to true, amount cap, minAmountOut enforced). Implicitly suggests alternative quote_swap for quotes. Lacks explicit when-not-to-use, but context is sufficient.

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/jumpboxtech/rhc-mcp'

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