Skip to main content
Glama

Compare up to 10 swap routes at once

compare_quotes
Read-only

Quote up to 10 routes in a single call (e.g. pay with USDC on Solana vs USDC on Base vs ETH) and get the best one by USD output. Saves round trips.

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": {
      "routes": "<routes>"
    },
    "name": "compare_quotes"
  }
}

Input Schema

NameRequiredDescriptionDefault
routesYesList of {from_token, from_chain, to_token, to_chain, amount}.
referrerNoOptional: your NEAR account (e.g. 'myagent.near'). You earn 1/3 of the service fee on every swap routed with it. The user pays the same.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered; the description adds real behavior beyond that by disclosing the selection criterion ('best one by USD output') and the round-trip tradeoff. It is silent on partial-failure behavior when some of the 10 routes fail to quote, which would be the remaining gap.

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

Conciseness5/5

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

Two short sentences, zero padding, with the capability and its scope front-loaded and the benefit ('saves round trips') last. Every clause earns its place.

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

Completeness3/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 only partly meets it: it says the best route by USD output is chosen but not whether all 10 quotes are also returned, which matters for a tool literally named 'compare'. Complex nested route objects are otherwise well documented in the schema.

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, and the description goes slightly beyond by giving worked examples that illustrate why from_chain matters (same symbol across Solana, Base, Ethereum). It adds no guidance on the referrer parameter or on the per-route shape, leaving the schema to carry that.

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 (quote/compare) and resource (routes) with explicit scope: 'up to 10 routes in a single call' and returning the best by USD output. The batching scope implicitly separates it from get_quote, which an agent can infer is the single-route variant.

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?

Gives clear usage context: use it to fan out several route options at once and save round trips, with a concrete example (USDC on Solana vs Base vs ETH). It stops short of naming get_quote as the alternative for one-off quoting or saying when not to batch, so no explicit exclusions.

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.