Skip to main content
Glama

HelmSwap

Build unsigned swap transaction

build_swap
Read-onlyIdempotent

Build an unsigned swap transaction for the user's own wallet to review and sign. Use only after get_quote, when the user wants the transaction and has given their own wallet address. If the quote has expired, get a fresh one first. Pass the quote object returned by get_quote (it carries the signed quote ticket); if omitted, a fresh quote is taken first. recipient is the wallet address the user gave for this swap, copied exactly; never a key or seed phrase. The transaction is real and live (swaps are live; this is not a sandbox). This server does not sign, execute or broadcast anything, and the chat cannot sign: the user signs in their own wallet, or opens openInHelmSwapUrl to review and sign on helmswap.com. No API key or sign-in is needed on Solana or EVM chains. If a build is refused or rate limited, give the user the openInHelmSwapUrl link from get_quote instead. Not financial advice.

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": {
      "recipient": "<recipient>"
    },
    "name": "build_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoNetwork. chain: 'solana', 'base', 'bnb', 'ethereum', 'robinhood', 'ink', 'hyperevm', 'elysium' or 'arc', or a numeric EVM chainId (default 8453, Base).
quoteNoThe object returned by get_quote. Must include quoteTicket.
chainIdNoEVM chain id. Ignored when chain is 'solana'. Default 8453.
tokenInNoToken to sell: contract address or mint, or a native symbol (ETH, BNB, SOL, HYPE).
amountInNoInteger amount of tokenIn in its smallest unit (for example 10000000 for 0.01 SOL, which has 9 decimals).
referrerNoOptional payout address (EVM 0x or Solana base58) to attribute a disclosed share of the fee. The trader pays the same fee either way.
tokenOutNoToken to buy: contract address or mint, or a native symbol.
recipientYesThe user's wallet address that will sign (EVM 0x or Solana base58). Address only, never a private key.
slippageBpsNoSlippage tolerance in basis points. Default 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses that swaps are live rather than sandboxed, that the server does not sign, execute, or broadcast, that the chat cannot sign, and that the user must sign in their own wallet or via openInHelmSwapUrl. It also states that no API key or sign-in is needed on Solana or EVM chains and provides a rate-limit fallback.

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?

The description is front-loaded with the core action and prerequisites, and most sentences carry necessary operational detail. It is somewhat long and repeats the signing/fallback theme, but the redundancy is limited and does not bury the key guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter transaction-building tool with no output schema, the description covers the critical prerequisites, signing limitations, live-environment warning, and fallback path. It could say more explicitly what the tool returns, but the key behavioral context an agent needs is present.

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 already 100%, so the baseline is 3, but the description adds meaningful semantics for the quote object, noting it carries the signed quote ticket and that omitting it triggers a fresh quote. It also reinforces that recipient is the user's wallet address copied exactly, never a key or seed phrase.

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 states a specific verb and resource: build an unsigned swap transaction for the user's own wallet to review and sign. That is clear enough for an agent to distinguish it from quote-retrieval tools, and the scope is concrete.

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?

It gives explicit sequencing and prerequisites: use only after get_quote, only when the user wants the transaction and has supplied their own wallet address, and fetch a fresh quote if the existing one expired. It also specifies fallback behavior if the build is refused or rate limited.

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.