Skip to main content
Glama

Create an escrow job

create_escrow_job
Read-onlyIdempotent

Builds the unsigned Base Mainnet transactions that lock USDC in escrow for one directory listing: the provider gets the price if the oracle finds the endpoint meets your latency limit; otherwise you get the price plus the 2% fee back. Use it to pay a provider conditionally; to check without paying, use check_endpoint. Payouts go only to a wallet the endpoint vouches for (x402 payTo, /.well-known/agentsla.json or a _agentsla TXT record); for an unverified wallet (providerVerified false) the payout waits at the job's claim link and is refunded to you after 6 days. Calling it changes nothing: your wallet signs a USDC approve (if needed) and createJob, then you call register_escrow_terms with the createJob hash. Returns the transactions, the total to approve and the listing.

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": {
      "walletAddress": "<walletAddress>",
      "apiId": "<apiId>",
      "providerAddress": "<providerAddress>",
      "priceUsdc": "<priceUsdc>"
    },
    "name": "create_escrow_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
apiIdYesListing id of the endpoint being paid for (from discover_monitored_apis or get_api_details), e.g. 29002.
priceUsdcYesPrice in USDC, e.g. 1.5. The payer approves price + 2%.
walletAddressYesPayer wallet on Base Mainnet that signs and funds the job.
providerAddressYesWallet that receives the price if the SLA is met. Paid at once if the endpoint vouches for it (x402 payTo, /.well-known/agentsla.json {"payoutAddresses":["0x..."]} or a TXT record at _agentsla.<domain>: agentsla-payout=0x...); otherwise held until it does.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / providerAddress / description
      Previous value: -"Wallet that receives the price if the SLA is met."New value: +"Wallet that receives the price if the SLA is met. Paid at once if the endpoint vouches for it (x402 payTo, /.well-known/agentsla.json {\"payoutAddresses\":[\"0x...\"]} or a TXT record at _agentsla.<domain>: agentsla-payout=0x...); otherwise held until it does."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

The description goes well beyond the annotations (readOnlyHint, idempotentHint, openWorldHint): it explains that calling it mutates nothing until the wallet signs, that the payer approves price + 2%, that payouts require a wallet the endpoint vouches for (x402 payTo, agentsla.json, or TXT record), and that unverified-wallet funds sit at a claim link and are refunded after 6 days. It also lists the returned values. Nothing contradicts the readOnlyHint — building unsigned transactions is genuinely non-mutating.

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?

Despite being a single dense paragraph, it is front-loaded with the core action and outcome before the mechanics. Some wording is redundant with the providerAddress schema entry (re-listing the x402/agentsla.json/TXT verification paths), which costs it a point, but no sentence is filler.

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 four-parameter, non-mutating transaction-builder with no output schema, the description covers the flow (build, sign, register), the return contents (transactions, total to approve, listing), and the edge cases (unverified provider, 6-day refund). An agent can complete the task without consulting further documentation.

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% and the schema already documents apiId, walletAddress, providerAddress, and priceUsdc in detail, including the approval of price + 2% and the payout-vouching mechanisms. The description does not name or add syntax-level meaning to any individual parameter, so it sits at the baseline where the schema does the heavy lifting.

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 names a specific verb and resource — 'Builds the unsigned Base Mainnet transactions that lock USDC in escrow for one directory listing' — and immediately distinguishes itself from check_endpoint. It also states the economic outcome (provider gets the price on SLA success; payer gets price + 2% fee back otherwise), so the agent knows exactly what the tool produces.

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?

Usage is explicit: 'Use it to pay a provider conditionally; to check without paying, use check_endpoint.' It also names the required follow-up step ('then you call register_escrow_terms with the createJob hash'), giving the agent the full call sequence rather than leaving it to inference.

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