Skip to main content
Glama

prepare_swap

Prepare unsigned, reviewed swap calldata for local signing on Base Aerodrome Slipstream, Base PancakeSwap V3, the Base agent swap guard, or a Solana Loopscale vault deposit. Use it when the user wants an executable transaction bound to a reviewed pool and policy. Do not use it to sign, submit or route arbitrary calldata, and do not skip the matching safety gate. Returns the unsigned transaction envelope (to/value/calldata), reviewed profile, quote and, where supported, a signed decision.

Input Schema

NameRequiredDescriptionDefault
vaultNo
venueYesReviewed execution venue
policyNo
walletNo
amount_inYesExact input amount as a decimal string
directionNo
recipientNo
asset_mintNo
profile_idNo
loan_symbolNo
min_lp_amountNo
max_slippage_bpsNo
principal_amountNo
collateral_symbolNo
collateral_value_usdNo
deadline_unix_secondsNo
source_decision_price_usdNo
destination_decision_price_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

With zero annotations, the description carries the burden and does disclose key behavior: it produces unsigned calldata only, never signs or submits, requires a reviewed pool and policy, and returns to/value/calldata plus quote and an optional signed decision. It does not cover operational traits an agent would want — whether repeated calls are idempotent, whether a safety gate must be called first in a specific order, or authorization/wallet-binding requirements.

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?

Four sentences, each doing distinct work: capability and venue scope first, then the use condition, then the exclusions, then the return contract. No restatement of the title and no filler; the return-value sentence is necessary because no output schema exists.

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?

Given 18 parameters, four heterogeneous venues, nested policy object, no annotations and no output schema, the description covers the purpose and return contract well but is incomplete on the two things that most affect correct invocation: which parameters each venue requires and how this tool sequences with the safety-gate and evidence siblings.

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 11% on 18 parameters, so the description must compensate and largely does not: it adds no per-parameter meaning beyond the venue names and a vague reference to a 'reviewed pool and policy'. Critically, it never explains that parameters are venue-dependent (vault/loan_symbol/principal_amount/collateral_* for Loopscale, direction/min_lp_amount for the V3-style venues, max_slippage_bps/deadline_unix_seconds generally), leaving the agent to guess which of the 18 fields apply to its chosen venue.

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 specific verb (prepare) and a specific artifact (unsigned, reviewed swap calldata), then enumerates the four supported venues by name (Aerodrome Slipstream, PancakeSwap V3, agent swap guard, Loopscale vault). An agent can distinguish this from quote, safety-check, and receipt siblings immediately; output is described as a calldata envelope for local signing.

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?

Explicit when-to-use ('user wants an executable transaction bound to a reviewed pool and policy') and explicit when-not ('do not use it to sign, submit or route arbitrary calldata', 'do not skip the matching safety gate'), which implicitly routes to the safety-gate sibling. What is missing is naming the concrete alternatives for the adjacent cases (get_market_quote for pricing only, check_trade_safety for gating, issue_execution_receipt for recording), so the agent must infer those routes.

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