Skip to main content
Glama

Prepare an order (typed data or transaction to sign)

prepare_order
Read-only

No version argument: every order runs on the v4 backend. Which optional arguments apply is decided by the quote that minted the quoteId, so decide before emitting any: a quote that offered a 'bySignature' permit takes permitSignature + permitDeadline once that permit is signed; route:'transaction' applies only to a SwapByTransaction... quote (a native-token sell) and takes no signatures at all. Never send a signature argument unsolicited - it exists to carry back a signature the quote explicitly asked for. Non-custodial: this returns what the user signs, and commits nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
routeNoWhich execution route the quote needs, taken from its __typename: 'intent' (default) for everything except SwapByTransaction..., which takes 'transaction' and returns the on-chain transaction plus an orderReceipt, the route a native-token sell takes.
quoteIdYesquoteId from get_swap_quote.
permitDeadlineNoUnix seconds, the 'deadline' from the permit message that was signed. Required with permitSignature.
permitSignatureNoThe user's signature (0x...) over the PermitTypedData a quote's approvals offered under 'bySignature'. Sending it skips the approval transaction. Never send it on a first call - you only have one once a quote has handed you a permit to sign. Requires permitDeadline.

TDQS

A4.6/5.0
Behavior5/5

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

readOnlyHint already signals a read-only operation, and the description goes well beyond it by stating 'this returns what the user signs, and commits nothing', explaining that signature parameters exist only to carry back what a quote explicitly requested, and pinning the v4 backend behavior. There is no contradiction with the annotation.

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?

Four sentences with no filler; the conditional argument rules are packed into one structured sentence, and every sentence adds distinct information. The version note is appropriately front-loaded and the non-custodial behavior lands last as a clarifying capstone.

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?

For a tool with no output schema, the description makes the operation understandable: it prepares a signable payload, commits nothing, and explains the input selection rules. It could be more explicit about what to do with the returned payload, but the sibling list and title cover most of that gap.

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 adds meaningful cross-parameter constraints: permit arguments apply only for bySignature quotes, the transaction route takes no signatures at all, and optionality is dictated by the quoteId's originating quote. These additions exceed what the schema alone says.

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 title and description together pin down a specific action: prepare an order as typed data or a transaction to sign. The description adds non-custodial semantics ('returns what the user signs, commits nothing') and route-specific behavior, which separates it from sibling prepare_* tools without needing their schemas.

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?

The description gives explicit conditional guidance: optional arguments are decided by the quote, route:'transaction' applies only to a SwapByTransaction quote, and a signature must never be sent unsolicited. It does not explicitly name alternative tools, 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.

TDQS

A4.1/5.0
Disambiguation4/5

The tool set is organized into clear read/prepare/action families, and cross-references like get_user_positions vs get_user_summary or get_markets vs get_reserve_details keep purposes distinct. A couple of generic names—prepare_action vs prepare_order, preview_action vs prepare_action—could cause misselection, but the descriptions explicitly separate them.

Naming Consistency4/5

Names overwhelmingly follow a verb_noun snake_case pattern: get_* for reads, prepare_* for transaction builders, plus cancel_order and submit_signed_order. The pattern is consistent overall, though a few generic exceptions like get_started, get_aave_guide, and preview_action break the strict resource-noun convention.

Tool Count2/5

With 40 tools, the set is well past the 25+ threshold and feels heavy even though the domain is broad. Most tools are distinct and justified, but an agent must navigate a very large list, and the server could reasonably be split into protocol, governance, and swap/order surfaces.

Completeness4/5

The surface covers v3/v4 reads, positions, health factors, simulations, transaction building, collateral, eMode, liquidation, rewards, sGHO, swaps/orders, and governance proposal reads, with clear sequencing between preview, prepare, and submit. Minor gaps exist—governance has no voting transaction and stkGHO balance/cooldown state is not readable—but they do not block the core Aave workflows.

Resources