Skip to main content
Glama

The Spice Melange Trading Desk: DeepBook market data connector

Build UNSIGNED swap transaction

build_swap_tx
Read-only

Build base64 UNSIGNED Sui transaction bytes for a swap on the chosen venue, with the sender set to your address and an on-chain minimum-out from slippage_bps. The bytes are simulated against mainnet before return. You sign locally and submit yourself; nothing is executed by the desk. Non-custodial: the desk never sees or holds keys and never moves funds; it returns quotes and UNSIGNED transactions only. Spot only, no leverage. Education only, not financial advice.

Input Schema

NameRequiredDescriptionDefault
toYes
fromYesCoin symbol: SUI, USDC, WAL, DEEP, CETUS
routeNoDeepBook only: route string from get_swap_quote, e.g. 'SUI_USDC -> WAL_USDC'
venueYesVenue from get_swap_quote (best.venue)
amountYesAmount of the from coin in human units, e.g. 2.5
senderYesYOUR Sui address (0x...). Public address only; never send a key.
simulateNoSimulate the unsigned bytes against mainnet (no signature, nothing executed)
slippage_bpsNoMax slippage in basis points (50 = 0.5%); tx reverts below min_out

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: the returned bytes are simulated against mainnet before return, nothing is executed by the desk, the caller signs locally and submits, and the desk is non-custodial. This clarifies the readOnlyHint=true profile (no world mutation, no key access) rather than contradicting it.

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?

Purpose and mechanics are front-loaded in the first two sentences; the remainder is compliance boilerplate. The non-custodial point is made twice ('nothing is executed', 'never moves funds') which is mildly redundant but not wasteful enough to derail the definition.

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?

With no output schema, the description correctly discloses the return artifact (base64 unsigned tx bytes) and its simulation status, plus the submit-yourself flow. Nothing an agent needs to invoke this correctly is missing.

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 88%, so the schema already documents from/to/amount/sender/venue/route/simulate/slippage_bps. The description re-states sender and min-out semantics ('on-chain minimum-out from slippage_bps') without adding format or edge-case detail beyond the schema, so the 3 baseline applies.

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+resource (build unsigned Sui swap transaction bytes) and names the scope constraints (chosen venue, sender address, min-out from slippage_bps). An agent can distinguish this from sibling builders like build_limit_order_tx or build_bm_deposit_tx purely from the text.

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

Usage Guidelines3/5

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

It gives implied usage constraints ('Spot only, no leverage', 'the chosen venue') but never explicitly says the venue/route must come from get_swap_quote first, nor names an alternative tool for different order types. The when-to-use context exists but is left for the agent to infer.

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.