Skip to main content
Glama

Compare execution routes

compare_execution
Read-only

Read-only best-execution comparison for one order: ranks the user's CEX books, on-chain perps books (with funding over the hold), DEX aggregator quotes (net of gas) and tokenized-stock routes by all-in one-way cost in bps. Unknown costs stay null and rank last; best is the cheapest route the user can use now (connected), bestSpot the cheapest that delivers the asset itself (not a perp), runnerUp + savingBps name the next alternative, cheaperIfConnected a cheaper venue they have not connected. Call it before proposing an order of $250 or more, or when the user asks for the best/cheapest venue or rate; then propose ONE card on best. Fees are base tier (the user's VIP tier may be lower).

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": {
      "side": "<side>",
      "base": "<base>",
      "size_usd": "<size_usd>"
    },
    "name": "compare_execution"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYesBase asset symbol, e.g. ETH, BTC, SOL, or a tokenized stock id like TSLA.
sideYesbuy = acquire the base asset (or go long), sell = dispose of it (or go short).
scopeNoRoute kinds to compare; omit for all.
chainsNoChains for aggregator quotes (e.g. arbitrum, base, solana); omit for a default per asset.
size_usdYesOrder size in USD notional (> 0).
exchangesNoCEX slugs to check; omit for the user's connections plus the largest public books.
hold_daysNoDays a perp would be held, for the funding leg (default 1).
connected_onlyNotrue = only venues the user can trade now. Default false (public venues are ranked too, best stays connected-only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: it discloses ranking fallback for unknown costs ('stay null and rank last'), the base-tier fee caveat ('the user's VIP tier may be lower'), and the connectivity semantics that distinguish `best`, `bestSpot` and `cheaperIfConnected`. Since there is no output schema, spelling out these returned fields is genuinely load-bearing.

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-loaded with purpose, then ranking rules, then the invocation triggers. The first sentence is heavily nested with parentheticals, which slows scanning, but nothing is redundant or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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-shape explanation itself (`best`, `bestSpot`, `runnerUp`, `savingBps`, `cheaperIfConnected`) plus the caveat about fee tiers, which is enough for an agent to call and interpret results correctly. Nothing material about the comparison scope is left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: `hold_days` exists for the funding leg of perp routes and aggregator quotes are net of gas, which clarifies why those parameters matter. It does not explain tradeoffs for `scope`, `chains` or `exchanges` limits beyond what the schema already says.

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 ('read-only best-execution comparison for one order') and immediately enumerates what is compared (CEX books, on-chain perps with funding, aggregator quotes net of gas, tokenized-stock routes) and by what metric (all-in one-way cost in bps). Clearly separable from analysis and order-placement siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ($250+ order, or user asking for best/cheapest venue or rate) and an explicit follow-up action ('then propose ONE card on `best`'), which routes the agent to the correct sibling pattern. It also implicitly excludes itself from small orders, so when-not-to-use is inferable, not guessed.

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.