Skip to main content
Glama

base_swap

Read-onlyIdempotent

Swap on Base at the best price — a ready-to-sign transaction — An executable swap on Base, routed by 0x across Uniswap, Aerodrome, Balancer, Curve and more. Returns the transaction for your own wallet to sign, plus the approval step if needed, minimum out, route and fees. We never hold funds. Name tokens as ETH, USDC, WETH, cbBTC, AERO… or a 0x address; buying an unknown token runs a sellability check first and refuses a honeypot unless force=1. Required inputs: sell, buy, amount, taker. Priced $0.01 per call over x402 on Base; send a prepaid x-credit-token header for unlimited calls, or get 1 free call/day per tool. No API key required.

Input Schema

NameRequiredDescriptionDefault
buyYesToken you buy
sellYesToken you sell
takerYesYour wallet (signs the swap)
amountYesAmount you sell
slippageNoSlippage in bps (optional, default 100)

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. Added

TDQS

A4.3/5.0
Behavior5/5

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

Despite readOnly/openWorld annotations, the description adds critical behavior: it returns an unsigned transaction plus approval step, never holds funds, runs a sellability check on unknown tokens, and refuses honeypots unless force=1. It also discloses pricing via x402, the x-credit-token header for unlimited calls, and one free call/day.

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?

Front-loads the core swap purpose and output, then covers safety and payment in a single dense paragraph. Slight redundancy appears in 'Swap on Base at best price' followed by 'An executable swap on Base,' and the paragraph is long, but every clause carries 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?

An output schema exists, so return values need not be explained, yet the description still covers transaction, approval, minimum out, route, fees, payment, and auth. The absence of explicit alternative-tool routing and the force parameter mismatch keep it from being fully 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?

Schema coverage is 100%, so the schema already documents all five parameters and the description adds only marginal parameter detail: token naming by symbol or address and a required-input list. It references force=1, which is absent from the schema, while slippage is only defined in the schema, creating minor inconsistency.

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 (swap), resource (tokens on Base), routing provider (0x across Uniswap, Aerodrome, Balancer, Curve, etc.), and the key output (a ready-to-sign transaction). Clearly distinguishable from siblings like near_swap, swap_route, or base_swap_validity by naming the chain and non-custodial output.

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?

Provides useful context: required inputs (sell, buy, amount, taker), token naming via symbols or 0x address, honeypot refusal with a force=1 override, and payment models. However it does not explicitly name an alternative swap tool or state when another sibling should be preferred instead.

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