Skip to main content
Glama

Build Swap

build-swap
Destructive

Build Swap. Calls only POST /v4/trading/swap and returns an unsigned transaction for the user to sign. This tool does not sign, submit, or broadcast, and it does not accept a private key. Solana API endpoint for building token swaps. Build and return unsigned transactions for direct swaps on DEXs like Pump.fun, Raydium and more.

Input Schema

NameRequiredDescriptionDefault
bodyYesRequest payload model for swap proxy params parameters used by this API endpoint.

Output Schema

NameRequiredDescriptionDefault
bodyNo
statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, openWorldHint=true, and idempotentHint=false. The description adds important behavioral context: it only calls POST /v4/trading/swap, returns an unsigned transaction, and never signs, submits, broadcasts, or accepts a private key. It does not explain why destructiveHint is true or the risk implications of the unsigned transaction, but with annotations present this is solid added context.

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

Conciseness3/5

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

The description is front-loaded with the endpoint and unsigned-transaction behavior, which is useful. It is somewhat repetitive, though: 'Build Swap,' 'building token swaps,' and 'Build and return unsigned transactions' restate the same core idea, so not every sentence fully earns its place.

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 complex swap-building tool with a nested body schema and an output schema, the description covers the essential context: endpoint, Solana/DEX scope, unsigned non-custodial behavior, and no private-key handling. It would be stronger if it explicitly routed agents to or away from get-swap-quote and clarified the destructiveHint implication, but it is nearly 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?

The schema has 100% description coverage, including rich nested details for the body and its many optional swap parameters. The description adds no parameter-level meaning beyond what the schema already provides, so the baseline score of 3 is appropriate.

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 states a specific verb and resource: building unsigned token swap transactions, calling POST /v4/trading/swap, for direct swaps on DEXs such as Pump.fun and Raydium. It is clear what the tool does, but it does not explicitly differentiate itself from siblings like get-swap-quote or other build-* tools.

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

Usage Guidelines3/5

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

The description implies usage for direct DEX swaps and clarifies that the result is unsigned for the user to sign. However, it does not explicitly say when to use this tool versus get-swap-quote or the other build-* siblings, nor does it provide exclusions or prerequisites.

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.