Skip to main content
Glama

swap_route

Get a 0x swap quote across chains by specifying tokens, amount, chains, and wallet; pay per call in USDC on Base via x402.

Instructions

0x swap quote across chains (paid per call, USDC on Base via x402)

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": {
      "fromToken": "<fromToken>",
      "toToken": "<toToken>",
      "fromAmount": "<fromAmount>",
      "fromAddress": "<fromAddress>"
    },
    "name": "swap_route"
  }
}

Input Schema

NameRequiredDescriptionDefault
toChainNo
toTokenYes
slippageNo
fromChainNo
fromTokenYes
fromAmountYes
fromAddressYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does add genuinely useful context: the call costs money, paid in USDC on Base via x402. However, it never states whether the tool only quotes or actually executes a route, nor anything about auth, rate limits, or failure modes for a paid mutation-adjacent operation.

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 tight phrase with the resource front-loaded and the cost caveat trailing. Nothing is wasted, though the extreme brevity is more under-specification than elegance.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter paid tool with no annotations, no output schema, and no schema descriptions, the definition leaves too much unresolved. An agent cannot tell from the description whether this returns a quote or submits a swap, what units fromAmount/slippage use, or what a successful paid response looks like.

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

Parameters2/5

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

Schema description coverage is 0% across 7 parameters, four of them required, so the description should compensate and does not. 'Across chains' only vaguely hints at fromChain/toChain and says nothing about fromToken, toToken, fromAmount, fromAddress, or the string-typed slippage semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource ('0x swap quote') and scope ('across chains'), which is far more informative than the bare name swap_route. It is slightly ambiguous whether the tool returns a quote or executes a swap, but the word 'quote' points to the read-only interpretation. Siblings are unrelated data tools, so differentiation is not really needed.

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

Usage Guidelines2/5

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

The one clause about payment ('paid per call, USDC on Base via x402') is a cost model, not a when-to-use rule. There is no statement of prerequisites, when to prefer this over any alternative, or what happens if payment is absent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.