Skip to main content
Glama

Quote a trade on Canton DEXes

quote
Read-onlyIdempotent

Best execution for selling amount of token sell (or amount_usd worth) for token buy, on every venue that can make the trade on its own markets in one or two swaps: an AMM pool (Cantex, Tradecraft, OneSwap, Pool Party), an order book (Temple, Rocky, Kora), or two of them in a row on the same venue (Temple: CC to USDCx, then USDCx to CBTC; Pool Party: CC to USDC.B, then USDC.B to CBTC). The same comparison as the site's best execution, at any size. Pool fees, book fees and price impact are included; after_network_fee also takes off the venue's per-trade network fee on each swap (the fee table, with which fees are measured, documented or assumed, is in network_fees). A pool whose reserves have stood still while its price left the market is no market here (not_trading). A venue whose route takes an order book that shows more of a token than exists (a side larger than its registry's total supply) carries book_shows_more_than_exists: its price, not a size it can fill.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sell": "<sell>",
      "buy": "<buy>"
    },
    "name": "quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
buyYesSymbol of the token bought, e.g. USDCx
sellYesSymbol of the token sold, e.g. CC
amountNoHow much of the sold token, in its own units. Give this or amount_usd, not both
amount_usdNoSize of the sale in US dollars at our price of the sold token. Give this or amount, not both

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / amount / description
      Added value: +"How much of the sold token, in its own units. Give this or amount_usd, not both"
    • addedInput schema / properties / amount_usd / description
      Added value: +"Size of the sale in US dollars at our price of the sold token. Give this or amount, not both"
    • addedInput schema / properties / buy / description
      Added value: +"Symbol of the token bought, e.g. USDCx"
    • addedInput schema / properties / sell / description
      Added value: +"Symbol of the token sold, e.g. CC"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safe-read profile (readOnlyHint, idempotentHint, destructiveHint false), and the description adds real substance beyond them: which costs are baked into the quote (pool fees, book fees, price impact), the network-fee treatment, and two named data-quality caveats (not_trading for stale reserves, book_shows_more_than_exists for books showing more than total supply). The reference to `after_network_fee` as if it were an available switch is not backed by the schema and slightly muddies the picture.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded in the first clause, but the remainder is one dense paragraph stitched together with nested parentheses and example routes, which slows parsing. 'The same comparison as the site's best execution, at any size' is the least load-bearing sentence and could be cut or moved to the end.

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 carries the return-value burden and does so reasonably: it names the enabling venues, the hop limit, what fees are folded in, and two result flags an agent must interpret. Remaining gaps are the overall response shape (best route, expected output amounts) and behavior when no venue can fill — neither is stated.

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 sell/buy symbols, amount in the sold token's own units, and the amount-vs-amount_usd exclusivity are all already documented. The description adds no syntax, units, or defaults beyond the schema, and it introduces `after_network_fee` as a named concept that does not appear among the four parameters, which may mislead an agent into trying to pass it.

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 — quoting best execution for selling one token into another — and bounds the search space precisely (AMM pools, order books, or two hops on the same venue, naming Cantex/Tradecraft/OneSwap/Pool Party and Temple/Rocky/Kora). An agent can tell this is a cross-venue price comparison tool rather than a single-trade checker or a venue lister.

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?

The scope constraint ('on every venue that can make the trade on its own markets in one or two swaps') implies usage, and 'The same comparison as the site's best execution, at any size' hints at sizing behavior. But it never states when to prefer this over check_trade, exit_cost, or spreads, and no when-not-to-use condition is given.

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.