Skip to main content
Glama

swap_route

Read-onlyIdempotent

Where to trade it, the impact, and whether it's safe to receive — Give a token and a trade size in USD → the deepest Base pool to route through, estimated price impact, a suggested slippage tolerance + minimum-out, all gated on a honeypot/sell-tax check of the token you'd receive (no point routing into something you can't sell). Moves an agent from analysis to action in one call. Required input: tokenOut. Priced $0.03 per call over x402 on Base; send a prepaid x-credit-token header for unlimited calls (no free tier on this tool). No API key required.

Input Schema

NameRequiredDescriptionDefault
tokenOutYesToken to receive
amountUsdNoTrade size in USD

Output Schema

NameRequiredDescriptionDefault
dataNoThe result payload. Shape is service-specific; every field is documented in the tool description.
serviceNoThe service id that answered.
checkedAtNoISO-8601 timestamp of when the underlying reads were taken.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / data / description
      Previous value: -"The result payload. Shape is service-specific; every field is documented in the service description above."New value: +"The result payload. Shape is service-specific; every field is documented in the tool description."
  2. Changed1 schema field changed
    • removedOutput schema / required
      Removed value: -[
      -  "data"
      -]
  3. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/non-destructive, and the description stays consistent with that (it produces a quote, not a trade). It adds genuinely useful context beyond the annotations: cost ($0.03/call over x402), the prepaid x-credit-token header path, no free tier, and no API key required — all auth/billing facts the agent needs before calling.

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?

Purpose is front-loaded in the first clause and the operational facts (required input, pricing, auth) come last. It is a dense run-on with an arrow clause and some redundant framing ('moves an agent from analysis to action'), but almost every sentence carries decision-relevant information.

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?

With an output schema present, the description needn't spell out return fields, and the safety annotations plus the billing/auth disclosure cover the practical gaps. The main omission is that chain scope (Base-only) is only implied by 'deepest Base pool' rather than stated as a constraint.

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 coverage is 100%, so both parameters are documented in the schema and the baseline is 3. The description reinforces that tokenOut is the required input and that the safety gate applies to the token being received, but adds no format or range detail (e.g., token address vs symbol, decimals) 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?

States a specific verb-and-resource outcome: given a token and USD size it returns the deepest Base pool, price impact, slippage/minimum-out, plus a honeypot/sell-tax gate. This is clearly distinguishable from execution-oriented siblings like base_swap and from narrower tools like price_impact or sellability, and an agent can tell what it gets without opening the schema.

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?

It frames the use case ('moves an agent from analysis to action', pre-trade routing/safety) and notes why the safety gate matters, which implies when to call it. However, it never names an alternative or an explicit when-not-to-use, leaving the boundary with base_swap (execution) and pre_trade_gate to inference.

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