Skip to main content
Glama

Warden Token Terminal

Execute a swap

execute_swap
DestructiveIdempotent

Sign and broadcast a swap from the user’s wallet without asking them. Only works while the user has hands-free trading on (agent_permissions → handsFree), and within the same limits as prepare_swap; if it is off, tell the user how to turn it on (handsFree.tellUser). Spends real funds: check agent_permissions first, and reuse the idempotencyKey on any retry. Sell the native coin by its address from list_chains. If the wallet has no gas coin (see get_wallet), sell an ERC-20 with gasless=true. Set buyChainId to land the bought token on another chain; then follow the trade with swap_status. On Solana it trades from the agent Solana wallet (get_wallet → solana.address), with SOL, USDC or USDT on one side.

Input Schema

NameRequiredDescriptionDefault
chainIdYes
gaslessNo
buyTokenYes
sellTokenYes
buyChainIdNo
sellAmountYes
slippageBpsNo
idempotencyKeyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructive and idempotent, but the description adds context structured fields cannot: it spends real funds, requires an explicit permission state, requires reusing idempotencyKey on retry, and behaves differently on Solana (agent Solana wallet, SOL/USDC/USDT pairing). These are the operational facts an agent needs before invoking a real-money mutation.

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?

Front-loaded with the action and the permission gate, then proceeds through edge cases in rough priority order. Dense but nearly every clause carries operational weight; the Solana sentence and the cross-chain sentence could be split for readability but are not padding.

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?

For a destructive real-funds tool with no output schema and zero schema descriptions, this covers prerequisites, failure paths, retry semantics, and chain-specific behavior well. Gaps remain around slippageBps semantics and what a successful result contains, though swap_status is named as the follow-up.

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 0% across 8 parameters, and the description covers idempotencyKey (reuse on retry), gasless, buyChainId, and sellToken (native coin address from list_chains). It leaves chainId, buyToken, sellAmount format, and slippageBps (with its 1–300 bounds) unexplained, so several parameters still carry no meaning beyond their names and types.

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 precise verb and resource — 'Sign and broadcast a swap from the user's wallet' — and implicitly separates itself from prepare_swap and quote_swap by referencing the limits inherited from prepare_swap. An agent can tell this is the final execution step, not a quoting or preparation step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit gating condition (handsFree must be on), an explicit fallback when it is off ('tell the user how to turn it on'), a required precheck (agent_permissions first), and a follow-up step (swap_status). It also gives conditional routing: use gasless=true when the wallet has no gas coin, and set buyChainId to land the token on another chain.

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.