Skip to main content
Glama

prepare_purchase

Prepare the non-custodial transaction package to BUY a listing (or accept an offer): ordered approvals + Seaport fulfillOrder calldata + a fresh contents snapshot. prepared.summary quotes the CURRENT price (Dutch auctions interpolate, asOf says when); the approval grants approveBaseUnits — slightly above the quote on a decaying order, never above maxTotalBaseUnits — and Seaport charges the exact interpolated amount at fill. On auctions, prepared.cleanup is an optional post-settlement tx that zeroes the residual allowance. The agent's own wallet signs and submits — this never signs or holds keys.

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": {
      "orderHash": "<orderHash>"
    },
    "name": "prepare_purchase"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderHashYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it declares non-custodial behavior ('never signs or holds keys'), explains that approvals are bounded (slightly above quote, never above maxTotalBaseUnits) while Seaport charges the exact interpolated amount, and notes prepared.cleanup as an optional residual-allowance cleanup. Gaps remain around failure modes (stale/cancelled order, insufficient balance) and chain/expiry semantics.

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?

The core action and deliverables are front-loaded in the first sentence, with pricing/approval mechanics and the non-custody disclaimer following in order of importance. Dense but every clause adds decision-relevant information; no 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?

For a one-parameter preparation tool with no output schema, the description does the work of explaining the returned package (summary, asOf, cleanup) and the sign-and-submit handoff. It is not fully complete on where to obtain the orderHash or how the package behaves if the order state changed before submission.

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 coverage is 0% for the single orderHash parameter, so the description must compensate. It implicitly clarifies that the hash identifies either a listing or an offer, which is meaningful, but it never gives format (bytes32 hex), provenance (get_listings/get_orders), or what happens on a mismatched hash type.

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 ('Prepare the non-custodial transaction package') and enumerates the exact deliverables: ordered approvals, Seaport fulfillOrder calldata, and a contents snapshot. The parenthetical '(or accept an offer)' and the BUY framing distinguish it from sibling prep tools like prepare_listing and prepare_offer.

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 a clear trigger — buying a listing or accepting an offer — so the agent knows the transaction-intent this tool serves. It does not explicitly name an alternative to use instead (e.g., prepare_listing when selling), leaving that routing to inference from the prep siblings' names.

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