Skip to main content
Glama

swap_quote

Start a private sealed-bid swap auction to get the best OTC quote. Returns a swap handle and best bid with zero slippage.

Instructions

One-call OTC swap intake for agents — opens a sealed-bid Ghost Auction under the hood and waits briefly for the first private market-maker bids, then hands back a swap_handle + the best bid so far. Async by design: there is NO public synchronous price (that is the privacy guarantee). Zero slippage: the bid you execute is the fill.

USE WHEN: an agent/user wants to "just swap X for Y" and have the facade manage quote collection + best-bid selection + a price guard. Privacy-sensitive or large flow. DO NOT USE WHEN: the caller wants explicit market-maker-aware RFQ control and will pick/accept quotes itself — use create_rfq. Sub-second DEX fills — use a DEX aggregator.

PARAM NOTES: limit_price is your sealed reservation — for SELL it is a FLOOR (min you will accept), for BUY a CEILING (max you will pay), per unit of base in quote-token terms. It is NEVER sent to makers. private defaults true (Ghost Auction ON — hides your identity from bidders); set false for an open auction. After this returns, call swap_execute (with the same limit_price, or best_bid.quote_id) to take it, swap_status to let competition build, or swap_cancel to abort. Real funds: restate the resolved deal to the user before executing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYesSELL = dispose of baseToken; BUY = acquire baseToken.
baseTokenYesBase asset symbol (see list_supported_pairs).
baseChainNoChain the base token settles on.
quoteTokenYesQuote asset symbol.
quoteChainNoChain the quote token settles on.
amountYesBase-token amount as a raw decimal string ("0.1", "2"). Do NOT convert to wei/satoshis.
limit_priceNoSealed reservation. SELL=floor, BUY=ceiling, per unit of base in quote terms. Never sent to makers.
privateNoGhost Auction (hide requester identity). Default true. Set false for an open auction.
expiresInNoRFQ lifetime seconds. Default 300. Hard cap 86400.
max_wait_secondsNoHow long swap_quote waits for first bids. Default 20, capped 25.
client_request_idNoIdempotency key. Same id within this MCP session returns the first result instead of opening a second RFQ. Best-effort: not durable across restarts.
Behavior5/5

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

Describes async nature, no synchronous price, zero slippage, ghost auction mechanism, limit_price secrecy, parameter defaults, and idempotency. No annotations provided, so description carries full burden and does so comprehensively.

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?

Well-structured with front-loaded summary, usage guidelines, parameter notes, and follow-up calls. Slightly lengthy but every sentence adds value; could be tightened slightly but overall effective.

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?

For a complex tool with 11 parameters, no output schema, and no annotations, the description covers return value, async behavior, privacy, parameter details, and post-call actions. Complete enough for proper use.

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 extra context in PARAM NOTES: limit_price as floor/ceiling, private default meaning, client_request_id best-effort idempotency, max_wait_seconds and expiresIn caps. This adds value beyond 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?

The description clearly states the tool as a one-call OTC swap intake that opens a sealed-bid Ghost Auction, returning a swap_handle and best bid. It distinguishes from sibling tools like create_rfq and DEX aggregators, providing specific verb and resource.

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?

Explicitly provides USE WHEN and DO NOT USE conditions, naming alternatives (create_rfq, DEX aggregator) and contexts (privacy-sensitive, large flow). Also maps follow-up tools (swap_execute, swap_status, swap_cancel).

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/Hashlock-Tech/hashlock-mcp'

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