Skip to main content
Glama

Report an x402 payment outcome

report_x402_payment
Idempotent

After your agent pays an x402 seller with any wallet, report what came back. Needs the resource URL, the settlement transaction hash and the outcome. Free; the report counts only with on-chain proof.

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": {
      "url": "<url>",
      "tx_hash": "<tx_hash>",
      "outcome": "<outcome>"
    },
    "name": "report_x402_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe x402 resource URL that was paid for
outcomeYesWhat came back: ok (the response was usable for its purpose), non_delivery (an error, an empty body or nothing usable after paying), wrong_goods (a usable response, but not what was asked for), overcharge (charged more than the quoted or listed price), duplicate (two settlements for one purchase)
tx_hashYesThe settlement transaction hash on Base: the `transaction` field of the seller's PAYMENT-RESPONSE or X-PAYMENT-RESPONSE header (base64 JSON)
http_statusNoThe HTTP status of the paid response, if known
quoted_usdcNoThe price the 402 quoted, in USDC, if known

Output Schema

NameRequiredDescriptionDefault
payerYesThe paying wallet, read from the transaction (never from the report)
pay_toYes
reasonYesWhy a report was rejected; null otherwise
statusYesverified: counted once folded in (minutes); pending: checked on Base again within minutes; duplicate: this transaction was already reported; rejected: not counted, see reason
sentenceYesThe result in one sentence
amount_usdcYesUSDC moved, read from the transaction
verification_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, idempotent, non-destructive write to an open world. The description adds two traits annotations cannot express: the call is free, and a report only counts when backed by on-chain proof, which tells the agent invalid submissions are worthless. It stops short of saying what happens to an invalid report or whether reports are publicly visible.

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?

Three short sentences, front-loaded with the trigger, then the required inputs, then the key constraint. Every sentence carries information an agent needs; nothing is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a full output schema and rich annotations, the description covers purpose, trigger, inputs, cost, and validity. The main residual gap is what the report then affects (e.g., seller reputation consumed by list_reliable_sellers), which would help an agent decide whether reporting is worthwhile.

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 coverage is 100%, so the schema already defines every field, including the outcome enum values and the tx_hash pattern. The description adds only a high-level recap of the three required inputs and the 'with any wallet' framing; the optional http_status and quoted_usdc fields get no extra meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource — 'report what came back' after paying an x402 seller — so the action is unmistakable. It is implicitly distinct from check_x402_seller, but it never explicitly contrasts the two, leaving the differentiation to inference.

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?

It states a clear trigger condition: use it after your agent pays an x402 seller, with any wallet. It also adds a gating rule ('the report counts only with on-chain proof'). There is no explicit when-not guidance or named alternative for cases where no payment occurred.

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