Skip to main content
Glama

APEX x402 Full MCP Hub

Swap build tx

swap_build_tx
Read-onlyIdempotent

Paid ($0.008 x402; $0.0064 w/ $10+ APEX — 60% cheaper than $0.02 15-chain swap APIs): 58-chain non-custodial same-chain swap & cross-chain bridge calldata builder (Robinhood 4663, Arc 5042, Base, Arbitrum, Optimism, Polygon, BSC, Solana, Monad, HyperEVM, Bitcoin, Tron, Hyperliquid, etc.) with automatic 1-block buy+sell Robinhood/Arc honeypot safety checks & Ed25519 signed JWS receipt. Zero custody.

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": "swap_build_tx"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoHuman-readable input amount (e.g. "10" for 10 USDC or "0.05" for 0.05 ETH). Default: 10.
walletNoOptional origin wallet address (defaults to paying agent wallet on EVM).
paymentNoOptional x402 payment header value.
toChainNoDestination chain slug or chainId (e.g. robinhood, arc, base, solana, arbitrum, monad, hyperevm, bitcoin, tron). Default: robinhood.
toTokenNoDestination token symbol or contract address (e.g. ETH, USDG, WETH, USDC, SOL, 0x...). Default: ETH.
fromChainNoOrigin chain slug or chainId (e.g. base, arbitrum, optimism, ethereum, polygon, bsc, robinhood, arc, solana, 8453, 4663). Default: base.
fromTokenNoOrigin token symbol or contract address (e.g. USDC, ETH, WETH, USDG, SOL, 0x...). Default: USDC.
recipientNoOptional destination address (required when bridging EVM <-> Solana/Bitcoin/Tron).
slippageBpsNoOptional slippage tolerance in basis points (1..5000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds meaningful context beyond that: it is a paid x402 endpoint with concrete pricing tiers, it performs automatic 1-block honeypot checks on Robinhood/Arc, and it returns an Ed25519-signed JWS receipt with zero custody. That is genuine behavioral disclosure, though rate limits and whether the caller must broadcast the calldata are not stated.

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?

It is a single dense sentence with no filler, but it front-loads pricing ahead of the actual purpose and packs in a long parenthetical chain list that an agent does not need to select the tool. Slightly over-stuffed, yet still scannable.

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?

There is no output schema, so the description must characterize the return value, which it does (calldata plus a signed JWS receipt). It also covers the payment prerequisite and custody model. The main gap is the absent workflow guidance relative to quote/check tools, but for a 9-parameter builder with fully documented schema, this is close to complete.

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 100%, with examples and defaults for every parameter, so the schema carries the burden. The description adds only the chain roster and no per-parameter semantics (e.g., how amount interacts with fromToken decimals, or when recipient becomes mandatory beyond the schema's note). Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb+resource: a 'non-custodial same-chain swap & cross-chain bridge calldata builder,' and enumerates supported chains. An agent knows exactly what it produces. It does not, however, distinguish itself from sibling quote tools (swap_build_quote, cross_chain_quote), so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no mention of the alternative tools in the sibling set (e.g., getting a quote first, or using tx_check before broadcasting). Usage is only inferable from the phrase 'calldata builder,' which the calibration treats as insufficient for more than a 2.

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.