Skip to main content
Glama

Build a transaction to sign

build_transaction
Read-onlyIdempotent

Build an unsigned Sui transaction for an action and get it back already checked: tide adds the protocol's own calls, picks the sender's gas coins, sets the budget, dry-runs the exact bytes on current mainnet state and runs the pre-sign check. Returns tx_bytes, a plain description, what leaves and enters the wallet, gas and the verdict. If it would fail or the check says danger you get the reason and no bytes. Amounts are whole coins. Actions: stake {amount, validator}; unstake {staked_sui_id, validator, amount}; lst_mint {lst, amount}; lst_redeem {lst, amount}; swap {from, to, amount, slippage_pct}; supply {protocol, asset, amount}; withdraw {protocol, asset, amount}. Lending protocols: suilend, navi, scallop. Swaps use the Aftermath router with slippage_pct (default 0.5) enforced on chain. steps runs several actions in one transaction; a step without amount takes the previous output. tide never signs: sign tx_bytes with your own wallet. Example: { sender: "0x...", action: "supply", protocol: "navi", asset: "USDC", amount: 100 }.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "build_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoswap: coin to buy.
lstNolst_mint / lst_redeem: afSUI, haSUI, vSUI, sSUI, stSUI.
fromNoswap: coin to sell.
passNoAgent Pass id: build for the pass's agent within the owner's rules (allowance, venues, caps, price floor), prechecked, with a signed receipt. Actions: swap, supply (NAVI), stake (validator address), transfer (listed recipient name); each step needs an amount.
assetNosupply / withdraw: the coin (USDC, SUI or a coin type).
stepsNoInstead of action: [{ action, ...fields }, ...] in one transaction.
actionNoWhat to do.
amountNoWhole coins, or "all" where allowed.
senderNoThe wallet that will sign (0x address). Not needed with pass.
protocolNosupply / withdraw: suilend, navi or scallop.
validatorNostake / unstake: validator address or name (stake picks one when left out).
slippage_pctNoswap: percent, default 0.5.
staked_sui_idNounstake: one StakedSui object id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / pass
      Added value: +{
      +  "description": "Agent Pass id: build for the pass's agent within the owner's rules (allowance, venues, caps, price floor), prechecked, with a signed receipt. Actions: swap, supply (NAVI), stake (validator address), transfer (listed recipient name); each step needs an amount.",
      +  "type": "string"
      +}
    • changedInput schema / properties / sender / description
      Previous value: -"The wallet that will sign (0x address)."New value: +"The wallet that will sign (0x address). Not needed with pass."
    • removedInput schema / required
      Removed value: -[
      -  "sender"
      -]
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, and the description is consistent with that: it never signs and only produces bytes. Beyond the annotations it discloses substantive behavior: tide injects protocol calls, selects gas coins, sets the budget, dry-runs exact bytes on current mainnet state, runs a pre-sign check, and returns no bytes with a reason on failure or danger verdict. That adds real value, though remaining operational details such as whether builds expire or can be replayed are unstated.

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 purpose, then returns, then failure behavior, then the action catalogue, and it ends with a concrete example. The action and steps discussion is dense but each clause carries operational information; a small amount of repetition between the amount/steps rules could be tightened.

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 13-parameter, multi-mode tool with no output schema, the description covers the return surface (tx_bytes, description, wallet flows, gas, verdict), the failure path, signing responsibility, and per-action field requirements. An agent has enough to call it correctly without opening the schema.

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%, so the schema baseline already documents each field, but the description adds meaning the schema does not: which fields each action requires, that amounts are whole coins and accept "all", that a step without an amount consumes the previous step's output, and that pass mode requires an amount on every step. Only minor gaps remain, such as the shape of the verdict object.

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?

Opens with a specific verb and resource: build an unsigned Sui transaction for an action, returned already dry-run and checked. It enumerates the exact action set (stake, unstake, lst_mint, lst_redeem, swap, supply, withdraw) and states the boundary with related tools by noting tide never signs, which cleanly separates it from confirm_execution and receipt tools.

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?

Gives concrete when-to-use context per action, including which protocols apply to supply/withdraw and that swaps route through Aftermath with slippage_pct. It also explains the pass variant's narrower action set and that steps batches actions, though it does not explicitly name sibling alternatives such as agent_pass_precheck or confirm_execution as the next step.

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