Skip to main content
Glama
m-flex
by m-flex

Create an escrow-protected purchase

create_purchase

Place an escrow-protected order for a listing; get a Nano deposit address to fund it. Funds remain in escrow until delivery is confirmed, protecting buyers if the item never arrives.

Instructions

Places an order against a listing. Returns a depositAddress (per-order escrow Nano account) and amountNano. IMPORTANT: the order is not funded by this call. Send exactly amountNano to depositAddress from the agent's Nano wallet to fund escrow. Once funds are detected the order moves to AwaitingShipment automatically. Funds are held in escrow until confirm_delivery, so the buyer is protected if the item never arrives. Physical listings require a shippingAddress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
quantityNoQuantity, default 1
listingIdYesListing to purchase
variantIdNoVariant ID from get_listing, when the listing has variants
quotedTotalNanoNoTotal in XNO from a recent get_listing call. Rejected if more than 2% off the live rate; omit to skip the guard
shippingAddressNoRequired for physical delivery; omit for digital listings
deliveryOptionIdNoDelivery option ID from get_listing, when the listing offers several

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it excels. It discloses that the order is not funded by this call, instructs to send exactly amountNano to depositAddress, explains the automatic state transition to AwaitingShipment, and notes funds are held in escrow until confirm_delivery. This goes well beyond a generic 'creates an order' and gives the agent the critical behavioral context needed to use the tool correctly.

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 description is well-structured and front-loaded with the core purpose. Each sentence adds value: the return values, the funding warning, the state transition, the escrow protection, and the shipping condition. The 'IMPORTANT:' callout effectively highlights the critical funding step without extra fluff.

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 complex purchase flow with 6 parameters, a nested object, and no output schema, the description is remarkably complete. It explains the full funding workflow, the automatic status change, the escrow protection, and the shipping requirement. It also describes the return values (depositAddress and amountNano) which would otherwise be unknown without an output schema. Nothing essential for correct invocation is missing.

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% — every parameter has a description in the input schema, so the baseline is 3. The description adds little beyond the schema: it restates the shippingAddress condition (already in the schema) and mentions the return values, but does not add new meaning for any specific parameter. It meets the baseline but does not elevate it.

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 opens with 'Places an order against a listing,' which is a specific verb+resource action. The title 'Create an escrow-protected purchase' reinforces the purpose. It clearly differentiates from siblings like get_order, confirm_delivery, and cancel_order, which are about other stages of the order lifecycle.

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 clear context on when to use the tool: it places an order and then requires a separate funding step. It explicitly states 'Physical listings require a shippingAddress,' a conditional usage note. It does not explicitly name alternative tools for other actions, but the distinct purpose makes it obvious which sibling to choose for creating a purchase.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.