Skip to main content
Glama

Prepare a Fusion order to sign

trdefi_fusion_prepare

Quote and build an EIP-712 Fusion order. Returns typedData (sign with eth_signTypedData_v4), the order object, extension, quoteId and orderHash. Nothing is signed or submitted. After signing, call trdefi_fusion_submit with the same order, the signature, extension and quote id. This is the gated-liquidity path: the user/agent does not need an Aqua NFT; a 1inch resolver fills the order (best-effort, not guaranteed).

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": {
      "chain": "<chain>",
      "fromToken": "<fromToken>",
      "toToken": "<toToken>",
      "amount": "<amount>",
      "wallet": "<wallet>"
    },
    "name": "trdefi_fusion_prepare"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesNetwork key, e.g. "ethereum", "base", "arc".
amountYesInput amount in token base units, as an integer string.
presetNoAuction preset. Defaults to the quote recommendation.
walletYesThe address that will sign the Fusion order.
toTokenYesOutput token address.
fromTokenYesInput token address.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotent=false, openWorldHint=true, so the bar is lower, and the description still adds real value: nothing is signed or submitted, the fill is best-effort and not guaranteed, and no Aqua NFT is required. Missing are quote expiry/lifetime and whether a quoteId can be reused, which matter for an order-preparation tool.

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?

Three tight sentences with zero padding: purpose first, return shape second, handoff and gating model last. Every sentence carries information an agent needs.

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 compensates by naming the return fields and the signing method (eth_signTypedData_v4). Combined with the explicit next-step tool and the resolver/gating model, an agent has everything needed to call it and chain it correctly.

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

Parameters3/5

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

Schema description coverage is 100% (chain, amount, preset, wallet, from/to token all documented), so the baseline is 3. The description adds a useful handoff mapping (order, signature, extension, quoteId go to submit) but says nothing about the parameters themselves beyond what the schema covers.

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 concrete verb and resource: "Quote and build an EIP-712 Fusion order", then enumerates the returned artifacts (typedData, order, extension, quoteId, orderHash). The only softness is overlap with the sibling trdefi_fusion_quote, which the description never explicitly separates itself from.

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 context: this is the gated-liquidity path where no Aqua NFT is needed and a 1inch resolver fills best-effort. It also spells out the next step (sign, then call trdefi_fusion_submit with order, signature, extension, quoteId). It does not say when to prefer this over trdefi_fusion_quote or trdefi_quote, so the alternative-selection gap keeps it at 4.

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