Skip to main content
Glama

Build a trade (unsigned)

build_trade

Constructs an unsigned buy or sell transaction for the user’s wallet to review and sign after a quote and explicit trade approval, with simulation and a plain-language summary.

Instructions

Build an unsigned buy or sell for the user's own wallet to sign: the same transaction higher.fun's site builds. Quote first with quote_trade and show the user the quote. Set confirm_trade to true only after the user has approved this exact trade (coin, side, amount, slippage). The transaction is checked instruction by instruction, simulated, and returned as base64 with a plain-language summary and a sign_url for the user to review and sign in their own wallet. It carries Highwire's 0.3% trade fee, one transfer to Highwire's wallet shown in the summary: on top of a buy, or from a sell's SOL. Tell the user. Highwire never signs and never needs a private key.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "wallet": "<wallet>",
      "mint": "<mint>",
      "side": "<side>",
      "max_slippage_bps": "<max_slippage_bps>",
      "max_sol": "<max_sol>",
      "confirm_trade": "<confirm_trade>"
    },
    "name": "build_trade"
  }
}

Input Schema

NameRequiredDescriptionDefault
solNoFor a buy: SOL to spend.
mintYesThe coin's mint address (base58). higher.fun mints usually end in 'high'.
sideYesbuy spends SOL for tokens; sell spends tokens for SOL.
tokensNoFor a sell: whole tokens to sell (supply is 1B).
walletYesThe wallet that will sign and pay (public key only).
max_solYesCap: a buy may spend at most this much SOL; a sell may return at most this much. At most 10.
confirm_tradeYesSet to true only after the user approved this exact trade.
max_slippage_bpsYesSlippage tolerance in bps, at most 1500 (15%).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations: instruction-by-instruction checks, simulation, base64 output with a plain-language summary and sign_url, the 0.3% fee with exactly where it is taken from (on top of a buy, out of a sell's SOL), and the custody guarantee that Highwire never signs or holds a private key. This is exactly the context destructiveHint=false and openWorldHint=true cannot convey on their own. Minor gap: no statement about whether the built transaction expires or how long it stays valid.

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 quote-first rule, then the safety/verification behavior, then the fee disclosure. Every sentence carries information, though the fee sentence and the 'Tell the user.' fragment are dense and packed into one long sentence that could be split for readability.

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 tool with no output schema, the description still explains what comes back (base64 transaction, plain-language summary, sign_url). It covers prerequisites, the approval gate, fee mechanics, and the non-custodial model — enough for an agent to call it correctly in a multi-step trade flow.

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 coverage is 100%, so the schema already documents all eight parameters including the buy/sell sol-vs-tokens split and the 1500 bps slippage cap. The description's only added semantic is tying confirm_trade approval to the specific coin, side, amount and slippage, which largely restates the schema's own confirm_trade description. Baseline 3 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 and resource — 'Build an unsigned buy or sell for the user's own wallet to sign' — and immediately scopes it as the same transaction higher.fun's site builds. It is clearly separated from quote_trade, which it names as the preceding 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?

Gives explicit sequencing (quote first with quote_trade, show the user the quote) and an explicit gate on confirm_trade: true only after approval of this exact trade, enumerating coin, side, amount and slippage. It also tells the agent to disclose the fee to the user, which is a usage obligation, not just behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.