Skip to main content
Glama

Swap quote

trdefi_quote
Read-onlyIdempotent

Price a swap against one position, on-chain, at the current block — no custody, nothing signed, nothing moved. Works on any pair the position trades, not only stablecoins. Use this to check liquidity and get the output amount before preparing a swap. If a position answers "Strategy is gated" (revert 0x89c62b64), the maker embedded an access-licence check in the order: the CALLER must hold the 1inch Aqua access token. That is a property of the strategy, not a bug — pass from with an address that holds the token to simulate as that caller. Measured on 2026-10-12: about half of sampled positions are gated this way, and the split is strongly per-network — BNB Chain quotes cleanly, Ethereum and Base are almost entirely behind the gate. Quotes are simulated on 17 networks: ethereum, base, arbitrum, optimism, polygon, arc, bnb-chain, gnosis, avalanche, sonic, linea, zksync-era, monad, unichain, hyperevm, cronos and robinhood-chain. This list is the set the quote path actually serves; if a network is not on it, do not promise a quote for it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesStrategy hash to quote against.
chainNoNetwork key. Defaults to "ethereum".
amountYesInput amount in token base units, as an integer string. e.g. "1000000" for 1 USDC.
directionNoaToB

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds substantial context beyond them: exact revert code 0x89c62b64 for gated strategies, why it happens (maker access-licence check requiring the 1inch Aqua access token for the caller), measured gating rates per network, and the authoritative list of 17 supported networks. That is far more than the annotations convey.

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 the core action and safety posture, then escalates into error handling and network coverage. It is long, but the gating and network-list content is operationally necessary; only 'That is a property of the strategy, not a bug' reads as 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 should describe the return shape, and it only promises 'the output amount' without naming fields or units. Everything else an agent needs — chain coverage, defaults, gating behavior, ordering relative to swap preparation — is present.

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?

The description instructs the agent to 'pass `from` with an address that holds the token', but no `from` property exists in the schema and additionalProperties is false, so following this instruction will fail validation — actively misleading. It also adds no meaning for `direction`, and only the network list enriches `chain` 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?

States a specific verb+resource (price a swap against a position) with explicit scope: on-chain, at current block, no custody, nothing signed. It also carves out behavior versus sibling read tools by framing it as the pre-swap pricing step. An agent can identify this as the quote path without opening any schema.

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 when-to-use context ('to check liquidity and get the output amount before preparing a swap') and clarifies a usage assumption ('any pair the position trades, not only stablecoins'). It does not name a sibling tool as an alternative or state when not to use it, so it stops short of a 5.

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