Skip to main content
Glama

swap_build

Build an UNSIGNED swap transaction on X1 — XNT <-> APEX and other listed pairs. Returns base64 you sign with your own key and broadcast yourself; this server never holds your keys and never signs for you. Use mint addresses, or the string "native" for XNT. APEX mint is Du6Z596DwGnfUcMSyRHSBQzNybiQKu8GESVfruEv9Jqr. Check priceImpact before signing — thin pools move hard. Free; you pay only the network fee.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount of tokenIn, in whole tokens (not raw units).
walletYesYour X1 wallet public key — it will be the fee payer and signer.
tokenInYesMint address to spend, or "native" for XNT.
slippageNoSlippage tolerance as a fraction. Default 0.01 (1%).
tokenOutYesMint address to receive, or "native" for XNT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral disclosure burden. It discloses that the tool does not sign, does not hold keys, returns a base64 transaction, and that users broadcast it themselves. It also warns about thin-pool price impact and confirms the only cost is the network fee.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded, with every sentence carrying useful information: purpose, return format, security model, token input guidance, risk warning, and cost. No filler or redundancy is present.

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?

Given no annotations and no output schema, the description covers the essential behavioral context: return format, self-signing workflow, token addressing, risk warning, and cost. The main gap is that 'other listed pairs' is not enumerated, and the return structure of priceImpact is only implied rather than explicitly described.

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?

The input schema fully documents the parameters with a high coverage, so the baseline is 3. The description adds value by providing the exact APEX mint address and reinforcing the use of 'native' for XNT. This extra constant and usage hint go slightly beyond the schema.

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 on X1. It further narrows scope with XNT/APEX and other listed pairs, and distinguishes itself by emphasizing the unsigned, self-broadcast nature. This is specific enough to separate it from generic swap 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?

The description clearly implies when to use the tool: when a user wants an unsigned transaction they can sign and broadcast themselves. It also adds practical guidance to check priceImpact before signing and notes the fee structure. It does not explicitly name alternative tools, but the usage context is clear.

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