Skip to main content
Glama

swap_route

Find an optimal swap route across Base aggregators and receive ready-to-sign calldata. You sign and send the returned transaction data to execute the trade.

Instructions

Best swap route across Base aggregators as ready-to-sign calldata. Costs $0.01 USDC via x402 plus a 10 bps fee inside the route (less for GLINT tiers). Returns to/data/value; you sign and send it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buyYesToken address or ETH
fromYesAddress that will sign and send the transaction
sellYesToken address or ETH
amountYesSell amount in the sell token's smallest unit, as a decimal string
recipientNoReceiver of the output token; defaults to from
slippageBpsNo1..2000, default 50

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/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 states the fee model, the output fields (to/data/value), and that the user must sign and send the transaction. It does not cover failure modes or route validity windows, but the core call behavior is transparent.

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?

Three short sentences each add distinct value: purpose, cost, and output/handoff. Information is front-loaded and there is no filler or redundancy.

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 output schema, the description usefully names the returned fields. Combined with the fully documented input schema, an agent has enough to call the tool correctly. Minor gaps like route expiry or failure behavior do not seriously hurt completeness.

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%, so the schema already documents all parameters and their meanings. The description adds useful context about signing and fees but does not need to repeat parameter-level detail.

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 action and resource: finding the best swap route across Base aggregators and returning ready-to-sign calldata. This clearly distinguishes it from the sibling swap_quote, which would provide a quote rather than executable transaction data.

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 makes the usage context clear: use this when you want an executable swap route to sign and send, with costs and fee structure stated up front. It does not explicitly name alternatives or exclusions, but the 'ready-to-sign calldata' framing gives clear context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.