Skip to main content
Glama

tradeReceipt

Tells you whether the swap you sent delivered what the quote promised. It only reads the chain.

  • Cost: free.

  • Inputs: quoteId and txHashes, the 1 to 4 transactions you sent for it.

  • Returns: result (pass, fail or pending), delivered against minAmountOut, each transaction's status and, on a fail or pending, a reason. delivered is what recipient received of token, in base units. next is done, retry, requote or stop.

  • Errors:

    • 400 invalid_request: a hash is not one of this quote's transactions from its taker. A Safe, an ERC-4337 account or a batching EIP-7702 wallet sends from elsewhere, so check your own transaction receipt.

    • 404 swap_not_found: tradeSwap handed out no transactions for this quote in the last hour.

    • 429 receipt_rate_limited: one chain read per quote every 5 seconds. Wait retryAfterSec, or resend the same txHashes for the last answer.

    • 429 receipt_reads_exhausted: this quote's 132 chain reads are used up, for good.

  • Next: follow next in the answer.

    • tradeQuote: quote again when next is requote.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
quoteIdYesThe quoteId you called tradeSwap with. It must have been handed transactions in the last hour.
txHashesYesThe 1 to 4 transactions you sent for the quote: the swap and any approvals. Each must be sent from the quote's `taker`, as an approval to the input token or a swap to ArcgateRouter that arcgate issued for this quote, whose output goes to its `recipient`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / quoteId / description
      Added value: +"The quoteId you called tradeSwap with. It must have been handed transactions in the last hour."
    • addedInput schema / properties / txHashes / description
      Added value: +"The 1 to 4 transactions you sent for the quote: the swap and any approvals. Each must be sent from the quote's `taker`, as an approval to the input token or a swap to ArcgateRouter that arcgate issued for this quote, whose output goes to its `recipient`."
  2. First observed

TDQS

A4.9/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 does so richly: it discloses rate limiting (one chain read per quote every 5 seconds), a hard lifetime cap (132 reads, exhausted 'for good'), 404 semantics tied to tradeSwap's one-hour window, and the caveat that Safe/ERC-4337/EIP-7702 senders will trip a 400 because they send from elsewhere.

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 one-line purpose, then labeled bullets for Cost, Inputs, Returns, Errors, and Next. The length is justified because it compensates for the absence of both annotations and an output schema; nothing is redundant or 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?

With no output schema, the description fully specifies the return value (`result`, `delivered` vs `minAmountOut`, per-transaction `status`, `reason`, and `next`) as well as every error code. Nothing an agent needs to call and interpret this tool is missing.

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 coverage is 100%, so the schema already documents both parameters; the description nonetheless adds real meaning by framing `txHashes` as the 1-4 transactions the caller sent (swap plus approvals) and by surfacing the wallet-type edge case where a hash legitimately will not belong to the quote's taker.

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 sentence names a specific verb and resource — verifying that a sent swap delivered what the quote promised — and immediately scopes it as read-only ('It only reads the chain'), which cleanly separates it from the write-oriented siblings tradeSwap/tradeSwapTx. An agent can distinguish it from tradeQuote and tradeSwap without opening any 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?

The 'Next' section gives explicit routing: follow the `next` field, and when it equals `requote`, call tradeQuote. Error blocks tell the agent exactly what each failure means and how to react (wait `retryAfterSec`, resend the same `txHashes`, or stop), including the terminal condition when reads are exhausted.

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