Skip to main content
Glama

Quote a swap

trnch_quote
Read-onlyIdempotent

Free, no key, no wallet: quote any pair on Elysium across five routers (Uniswap, KyberSwap, LI.FI, Nordstern and 0x) without building a transaction. Returns the best amount out, already net of the Trnch fee, the router and the fee rate in basis points (feeBps). Native HYPE is the zero address. A transaction (trnch_buy, trnch_sell) needs an API key. A partner's integrator fee (integratorFeeBps, or the partner's default fee when the request carries X-Trnch-Partner-Key) is added to the Trnch fee and taken by the same router fee on every router; a router whose maximum fee is below the total is left out of the quote. The integrator fee is paid to the partner through the Trnch partner program after the swap is confirmed on chain. fees in the response: { side, token, trnch { bps, amount }, integrator { bps, amount, partner } or null, minAmountOut }, amounts in the smallest unit; minAmountOut is net of both fees and of slippage.

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": {
      "tokenIn": "<tokenIn>",
      "tokenOut": "<tokenOut>",
      "amountIn": "<amountIn>"
    },
    "name": "trnch_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
fastNoReturn the first clean quote after about 250 ms instead of waiting for the best price. Default false.
tokenInYesToken sold: an Elysium token address, or the zero address for HYPE.
amountInYesAmount of tokenIn in its smallest unit (wei-style integer string).
slippageNoLegacy: max slippage as a fraction (0.01 = 1%). Send slippageBps or slippage, not both.
tokenOutYesToken bought: an Elysium token address, or the zero address for HYPE.
decimalsInNoDecimals of tokenIn. Default 18: set it for USDC (6) and other non-18 tokens.
decimalsOutNoDecimals of tokenOut. Default 18: set it for USDC (6) and other non-18 tokens.
slippageBpsNoMax slippage in basis points (100 = 1%). Default 100.
integratorFeeBpsNoIntegrator fee in basis points, 0 to 100, for a partner identified by X-Trnch-Partner-Key or by the partner ref of the API key. Overrides the partner's default fee; the default fee applies only with X-Trnch-Partner-Key, never through the partner ref of the API key alone. Without a partner, a value above 0 is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / slippage / description
      Previous value: -"Max slippage as a fraction (0.01 = 1%). Default 0.01."New value: +"Legacy: max slippage as a fraction (0.01 = 1%). Send slippageBps or slippage, not both."
    • addedInput schema / properties / slippageBps
      Added value: +{
      +  "description": "Max slippage in basis points (100 = 1%). Default 100.",
      +  "maximum": 5000,
      +  "minimum": 10,
      +  "type": "integer"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / integratorFeeBps / description
      Previous value: -"Optional integrator fee in basis points, 0 to 100. Added to the Trnch fee and paid by the router to integratorRecipient in the same transaction. Default 0."New value: +"Integrator fee in basis points, 0 to 100, for a partner identified by X-Trnch-Partner-Key or by the partner ref of the API key. Overrides the partner's default fee; the default fee applies only with X-Trnch-Partner-Key, never through the partner ref of the API key alone. Without a partner, a value above 0 is refused."
    • removedInput schema / properties / integratorRecipient
      Removed value: -{
      -  "description": "EVM address that receives the integrator fee. Required when integratorFeeBps is above 0; the zero address is refused.",
      -  "pattern": "^0x[0-9a-fA-F]{40}$",
      -  "type": "string"
      -}
  3. Changed2 schema fields changed
    • addedInput schema / properties / integratorFeeBps
      Added value: +{
      +  "description": "Optional integrator fee in basis points, 0 to 100. Added to the Trnch fee and paid by the router to integratorRecipient in the same transaction. Default 0.",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / integratorRecipient
      Added value: +{
      +  "description": "EVM address that receives the integrator fee. Required when integratorFeeBps is above 0; the zero address is refused.",
      +  "pattern": "^0x[0-9a-fA-F]{40}$",
      +  "type": "string"
      +}
  4. Changed2 schema fields changed
    • changedInput schema / properties / tokenIn / description
      Previous value: -"Token sold: a Elysium token address, or the zero address for HYPE."New value: +"Token sold: an Elysium token address, or the zero address for HYPE."
    • changedInput schema / properties / tokenOut / description
      Previous value: -"Token bought: a Elysium token address, or the zero address for HYPE."New value: +"Token bought: an Elysium token address, or the zero address for HYPE."
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description goes well beyond that: no auth/wallet needed, the fee-stacking model, that routers whose max fee is below the total are dropped from the quote, that the integrator fee is settled through the partner program only after on-chain confirmation, and the exact response fee shape.

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?

The key facts — free, no key, no transaction, best amount out net of fees — are front-loaded, which is good. It is one dense run-on paragraph, and some material (return-value fee breakdown) is long but justified because there is no output schema. Slight penalty for dense packing rather than structure.

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?

For a 9-parameter read-only quote tool with no output schema, the description supplies exactly what's missing: the response fee object shape, minAmountOut semantics (net of both fees and slippage), smallest-unit amounts, and router exclusion edge cases. Nothing an agent needs in order to call it correctly and interpret the result is absent.

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; the description earns extra by explaining cross-parameter behavior the schema can only hint at: integratorFeeBps stacks on top of the Trnch fee, is taken by the same router fee on every router, and is refused without a partner. It also restates the HYPE zero-address convention, which is redundant with 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?

The description states a specific verb and resource ('quote any pair on Elysium across five routers') and explicitly delimits it from the transaction siblings: 'without building a transaction. A transaction (trnch_buy, trnch_sell) needs an API key.' An agent can distinguish this read-only quote tool from trnch_buy/trnch_sell without opening either schema.

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?

It gives explicit use conditions ('Free, no key, no wallet') and names the alternative path with its precondition (trnch_buy/trnch_sell require an API key). The router-exclusion rule and the partner-fee requirement ('Without a partner, a value above 0 is refused') further tell the agent when this call is valid versus refused.

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