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. A wallet the endpoint vouches for (x402 payTo, /.well-known/agentsla.json or a _agentsla TXT record) is always paid; an unverified wallet (providerVerified false) is paid while its payouts stay within 1,000 USDC per 30 days, and beyond that 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. Always paid 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 paid within 1,000 USDC per 30 days and held beyond that 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. 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."New value: +"Wallet that receives the price if the SLA is met. Always paid 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 paid within 1,000 USDC per 30 days and held beyond that until it does."
  2. 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."
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true and idempotentHint=true, and the description explains exactly why: 'Calling it changes nothing: your wallet signs a USDC approve (if needed) and createJob,' i.e. it only produces unsigned transactions, so no server state is mutated. It goes well beyond the annotations with the payout policy (verified wallet always paid; unverified wallet capped at 1,000 USDC per 30 days, then held at the claim link and refunded after 6 days) and the 2% fee back on SLA failure — none of which the structured fields convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the check_endpoint alternative are correctly front-loaded, but the body is a dense multi-rule block, and the wallet-verification clause (x402 payTo / agentsla.json / TXT record / 1,000 USDC cap / 6-day refund) duplicates almost verbatim what the providerAddress schema description already says. Useful content, but some of it does not earn a second telling.

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?

There is no output schema, and the description compensates: 'Returns the transactions, the total to approve and the listing.' For a four-parameter, no-nested-objects tool whose main risk is misunderstanding its non-mutating nature, everything an agent needs before calling it is present.

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%, so the schema already carries the per-parameter burden, including the price+2% approval and the provider verification conditions. The description's fee and verification wording largely restates that schema text rather than adding new parameter-level meaning, so this sits at the high-coverage baseline.

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 and artifact: 'Builds the unsigned Base Mainnet transactions that lock USDC in escrow for one directory listing.' It immediately names the counterpart sibling ('register_escrow_terms' follows, 'check_endpoint' is the no-pay alternative), so an agent can separate this from every other tool in the family without opening a schema.

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?

Explicit routing: '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'), which tells the agent this tool is not the end of the workflow. Both when-to-use and the alternative are stated outright.

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