Skip to main content
Glama

nn_build

Builds ONE signable/sendable atomic transaction executing every leg of an N:N basket through VurtoSwapRouter. Always re-quotes the whole basket fresh from chainId/inputLegs/outputLegs — there is no quoteId handoff for N:N, pass the same fields used for nn_quote (or skip nn_quote and call this directly). No API key required: pass the wallet that will sign. A machine credential is optional and only raises your limit from the per-IP cap to the credential budget. Returns steps[]: one approve step per DISTINCT input token that still needs allowance, followed by ONE transaction step that executes every leg atomically. The approve target is the VurtoSwapRouter address (steps[].spender / the build's router), NOT each leg's underlying provider — this router pulls every input token itself inside one contract call, so approving providers individually the way swap_build does would approve the wrong address. If simulation.status is approval_required, send the approve step(s) first and call nn_build again for the executable transaction. legs[].routeSwitch, when present on a leg, means the provider the quote picked for THAT leg refused to build (it hit its request limit) and the leg was built with another provider instead: {from, to, reason}. Only that leg changed, the others are untouched, and the replacement is what will be signed: say which provider replaced it before the user signs. IMPORTANT: report_execution and swap_status do NOT support nn_build's transaction step — both key off a single quoteId, and this build has none (it is one transaction covering every leg, not one quote). After sending it, confirm success by checking the transaction receipt directly, not swap_status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesWallet that will sign. Required for builds and EVM execution/history calls. On an anonymous EVM quote, pass it to make the returned quoteId executable; without it the quote is indicative.
chainIdYesEVM: integer from GET /v1/chains (1, 10, 56, 100, 137, 8453, 42161, 43114, 130). Solana: string from GET /v1/svm/chains ("solana-mainnet").
inputLegsYes
outputLegsYes
slippageBpsNoOptional, 5-500, applied to every leg. Default 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

The description discloses critical behavior beyond the minimal annotations: no quoteId handoff, fresh re-quoting, optional machine credential rate-limit effects, approve-step targeting of VurtoSwapRouter rather than underlying providers, approval_required simulation flow, routeSwitch fallback semantics, and unsupported status endpoints. This is far more than the annotations alone provide.

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 long, but the complexity of the tool justifies the length. It is front-loaded with the core purpose and organized around major behavioral topics (quoting, auth, steps, routeSwitch, status). A few sentences are slightly redundant, such as the repeated no-quoteId point, but no sentence is filler.

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?

With no output schema, the description fully explains the return shape (steps[] with approve steps and one transaction step), the approval flow, the routeSwitch replacement behavior, and the correct post-send verification path. It covers auth, prerequisites, and error/fallback conditions, leaving no critical gap for an agent to call it correctly.

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 moderate at 60%, and the description adds contextual meaning by tying chainId/inputLegs/outputLegs to the fresh re-quote behavior and by explaining that wallet is the signing wallet. It does not walk through every parameter, but the schema already documents the individual fields, and the description clarifies how they are used together.

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 opens with a specific verb and resource: 'Builds ONE signable/sendable atomic transaction executing every leg of an N:N basket through VurtoSwapRouter.' It clearly distinguishes itself from related tools by emphasizing the N:N basket scope, the absence of quoteId handoff, and the contrast with swap_build's per-provider approvals.

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 when-to-use guidance: pass the same fields as nn_quote or skip nn_quote and call directly, and no API key is required. It also states when not to use supporting tools: report_execution and swap_status do not support this build's transaction step, so the agent should check the receipt directly.

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