Skip to main content
Glama

Pay an order into escrow

agoreum_pay_order

Pays an order using the local wallet after checking spend limits and order status, with funds held in escrow until delivery and release.

Instructions

Pay an order with the local wallet (the key never leaves this machine), after checking the spend limits. On the x402 rail it signs one authorization and Agoreum relays it. On the direct escrow rail it sends two transactions itself, approve and then createEscrow, rebuilt from the order's own payment instructions and refused if the API's encoding differs; the wallet pays the gas in ETH. Either way the money is held by the escrow, not paid out, until the work is delivered and released. Before anything is signed or sent it checks that the order is still awaiting payment and, on the escrow rail, that no escrow exists for it yet (so a retry after a timeout never pays twice), that the wallet holds enough USDC, and, when given, that the amount and chain match expected_amount_usdc and expected_chain_id. Call agoreum_preview_payment first.

Input Schema

NameRequiredDescriptionDefault
order_idYes
expected_chain_idNo
expected_amount_usdcNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-rc.7

TDQS

A4.7/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 delivers: keys stay local, gas is paid in ETH, funds are escrowed rather than paid out until release, retries are idempotent against double payment, and encoding mismatches are refused. The main omission is what happens on failure or what the call returns, which matters for a money-moving tool with no output schema.

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?

Front-loaded with the action, then rails, then preconditions, then the preview pointer. It is dense and long but every clause conveys a distinct behavioral fact; little could be cut without losing safety-relevant information.

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 three-parameter mutation tool with no annotations and no output schema, the definition covers signing paths, gas, escrow custody, idempotency, balance and amount validation, and sequencing relative to the preview tool. Only the return payload is undescribed, which is a minor gap given the rest of the coverage.

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 description coverage is 0%, so the description must compensate, and it does: order_id drives the payment-instruction rebuild, and expected_amount_usdc and expected_chain_id are explained as optional assertions checked before signing. It stops short of stating the expected format of expected_amount_usdc beyond the schema pattern, but the semantic guardrail role of each parameter is clear.

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?

Names a specific verb and resource (pay an order) and immediately distinguishes the two rails it can take: x402 signing versus direct escrow with approve plus createEscrow. An agent knows exactly what operation is performed and can separate it from sibling tools such as agoreum_preview_payment or agoreum_settle_order.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells the agent to call agoreum_preview_payment first, defines preconditions for use (order must still be awaiting payment, no escrow may already exist), and states refusal conditions for chain/amount mismatches and encoding differences. The when-to-use and when-it-will-refuse guidance is unusually complete.

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