Skip to main content
Glama

Stabledrop escrow payments

Prepare Escrow Payment

prepare_escrow_payment

Work out where a payment must go, before anybody signs or sends anything.

seller and nominal_buyer may each be a wallet address OR AN EMAIL ADDRESS — an email is converted to the wallet that person owns, so you never need to know a wallet to use this.

Returns the escrow address these terms produce, and TWO ways to fund it. Both end at the same address holding the same money; they differ only in who sends the transaction.

Transfer it yourself. Send the tokens to the address from any wallet — a browser wallet, a hardware wallet, an exchange withdrawal. Nothing to sign for us, and no payer needed, because the escrow never asks who paid: it reads its own balance. Then call settle_escrow_payment with no signature and we create the escrow around what is there.

Or let us relay it. Pass payer and this returns an EIP-3009 authorization for them to sign. We broadcast it and pay the gas, so the payer needs no gas at all. This is the only one an agent can complete unattended, and the only one that needs a key anywhere.

Either way the address is the same, because it is a pure function of the terms. That is also what makes the relayed form safe: the payer signs to as part of the authorization, committing to every term at once — alter any of them afterwards and the address moves and the signature stops matching.

amount is in the TOKEN's base units (1 USDC = 1000000), because that exact figure is one of the terms the address derives from.

expiry_timestamp is an absolute Unix time — when the dispute window closes. 0 settles instantly with no recourse. There is no default: "instant, deliberately" and "nobody said" are different, and a caller must not discover afterwards which one they got.

nominal_buyer is who may dispute and receives a refund. For an agentic payment this should be the PERSON, not the agent — they are the one who will later read a report and decide whether to object.

seller and nominal_buyer may each be a wallet address OR an email address. An email resolves to the wallet Privy holds for that person — made for them if they have never logged in — and the same email always resolves to the same wallet, so the address derived here is the one settle_escrow_payment derives too. The resolved wallets come back under parties. A seller given by email is paid into that wallet; they sign in with the email to reach it.

external_id keeps two otherwise-identical payments apart, and is one of the terms the address derives from. Leave it out and a unique one is generated. That is the right default: two payments matching in seller, amount, maturity and buyer would otherwise derive to the SAME address, and funding the second sends money into the first escrow — recoverable only after that one is claimed, and only to ITS buyer.

⚠️ PASS BACK THE external_id THIS RETURNS, not the one you sent. A generated one is only knowable from the result, and settle derives the address again from whatever it is given: a different id is a different address, and the money is at this one.

Supply your own for the opposite behaviour — a checkout hash gives "one checkout, one escrow", so re-presenting the same purchase returns the same address rather than a second.

description is what the payment is FOR, in the buyer's own words — ask them for it rather than defaulting. It is what they will be looking at in the dashboard weeks later deciding whether to dispute, and "Escrow payment" tells them nothing about which one this was. It does not affect the address, so it can be set freely here.

⚠️ 1 to 160 characters. Longer is refused HERE rather than at the chain, where the check happens after the money has already moved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payerNo
amountYes
sellerYesWho gets paid: a wallet address (0x…) OR an email address. An email is converted to the wallet that person owns, created for them if they have never signed in; the same email always gives the same wallet.
descriptionNoEscrow payment
external_idNo
token_symbolNoUSDC
nominal_buyerYesWho may dispute and receives any refund — the PERSON, not the agent: a wallet address (0x…) OR an email address. An email is converted to that person's wallet, created for them if they have never signed in.
expiry_timestampYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / nominal_buyer / description
      Added value: +"Who may dispute and receives any refund — the PERSON, not the agent: a wallet address (0x…) OR an email address. An email is converted to that person's wallet, created for them if they have never signed in."
    • addedInput schema / properties / seller / description
      Added value: +"Who gets paid: a wallet address (0x…) OR an email address. An email is converted to the wallet that person owns, created for them if they have never signed in; the same email always gives the same wallet."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full transparency burden and carries it very well. It reveals the key behaviors: email-to-wallet resolution, same address regardless of funding path, generated external_id and the danger of sending a different one, amount units, expiry_timestamp semantics with no default, description length validation, and the EIP-3009 relay mechanics. An agent gets a realistic model of side effects and failure modes.

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 description is long but well-structured with bolded options, explicit warnings, and front-loaded purpose. However, the wallet-or-email point is made twice in similar wording, and some explanatory passages are more verbose than strictly necessary. It is justified detail rather than filler, but the duplication keeps it from a perfect conciseness score.

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, high-stakes financial preparation tool, the description is remarkably complete: it covers required parameters, optional parameters, failure semantics, defaults, cross-tool sequencing, and the exact reason the returned external_id must be passed back. The output schema exists, so the description correctly focuses on behavior and preconditions rather than restating return fields.

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

Parameters5/5

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

Schema coverage is only 25%, but the description compensates thoroughly: it explains amount base units, absolute Unix expiry and the significance of 0, external_id generation and matching behavior, description length and purpose, payer's role in the relay path, and the seller/nominal_buyer email-or-wallet semantics. Every meaningful parameter except the self-evident token_symbol is given practical meaning beyond 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 opening line 'Work out where a payment must go, before anybody signs or sends anything' gives a precise verb, resource, and phase of the payment lifecycle. It clearly states the tool returns the escrow address and two funding paths, and explicitly positions it ahead of settle_escrow_payment, distinguishing it from the sibling that actually creates the escrow.

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 contextual guidance: this is the pre-signing/pre-sending step, and later you 'call settle_escrow_payment with no signature'. It also distinguishes the two internal paths and notes that the relayed path is the only one an agent can complete unattended. It does not explicitly enumerate when to avoid the other sibling tools like check_escrow_payment or verify_escrow_receipt, so it stops short of a perfect alternative-selection guide.

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