Skip to main content
Glama

Price a swap

get_swap_price
Read-onlyIdempotent

What swapping one token for another on Base would return right now through 0x (the route the website uses): amount out, the fees (Panda 0.15% in the sold token + 0x 0.15%) and the sources. No wallet needed.

Input Schema

NameRequiredDescriptionDefault
amountYesAmount to sell, in whole tokens, e.g. "25" or "0.01".
buy_tokenYesToken to buy: a symbol (USDC, WETH, AERO, BNKR, cbBTC) or a token address on Base.
sell_tokenYesToken to sell: a symbol (USDC, WETH, AERO, BNKR, cbBTC) or a token address on Base.
slippage_bpsNoOptional slippage tolerance in basis points (default 50 = 0.5%).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description goes further by disclosing the fee structure (0.15% Panda in the sold token + 0.15% 0x), that the price is live ('right now'), and that no wallet is required. Return contents are also enumerated, though the response format itself is not described.

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?

A single dense sentence with parenthetical asides; the key fact (a live quote through 0x) is front-loaded and every clause adds information. Slightly packed, but no filler.

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 no output schema, the description must carry the return-shape burden, and it does list amount out, fees, and sources. Missing only edge-case behavior (unsupported tokens, price staleness), which is minor for a read-only quote tool.

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 amount, tokens, and slippage_bps thoroughly. The description adds only the detail that the Panda fee is denominated in the sold token, which does not meaningfully enrich parameter semantics 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?

The description states a specific verb and resource ('What swapping one token for another on Base would return right now'), names the routing provider (0x), and previews the exact output (amount out, fees, sources). This clearly separates it from the build_* siblings that actually construct swap transactions.

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?

'No wallet needed' implies this is a pre-trade quote, which hints at when to use it relative to build_swap, but no alternative is named and there is no explicit when/when-not guidance or prerequisite statement. Usage is inferable rather than stated.

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