Skip to main content
Glama

Verify a USDC payment

verify_payment
Read-onlyIdempotent

Verify a USDC payment on Base before retrying a paid request; the free pre-retry check between price_task and execute_task.

Free to call, no authentication, no side effects. Never raises - always HTTP 200 with the verdict in the body, not the status.

Parameters: the hash must be the same one set in the X-Payment header; set min_cents to the task's exact price, since a value above it makes a correct payment read as invalid.

When to use: after sending USDC, before retrying. If valid, retry with the same hash; if not, do not.

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": {
      "tx_hash": "<tx_hash>"
    },
    "name": "verify_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
tx_hashYesBase transaction hash (0x-prefixed) of the USDC payment to verify, e.g. the hash your wallet returned after sending.
min_centsNoMinimum acceptable payment amount in USDC cents (1 cent = 0.01 USDC). Default 1000 = 10 USDC. The payment must be worth at least this much to pass, otherwise valid is false.

Output Schema

NameRequiredDescriptionDefault
errorNo
validNotrue when the payment is confirmed
amountNo
reasonNo
tx_hashNo
receiverNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), yet the description adds genuinely non-obvious behavior: free to call, no authentication, and critically 'Never raises - always HTTP 200 with the verdict in the body, not the status.' That last detail prevents a common agent failure mode of inferring validity from the HTTP status.

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 purpose, then behavior, then parameters, then when-to-use — four short blocks with zero filler. Every sentence carries operational information; nothing is restated from annotations or schema.

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 two-parameter read-only verification tool with an output schema, this covers everything needed to call it correctly: where it sits in the workflow, the header/hash coupling, the min_cents pitfall, and the fact that the verdict arrives in the body. Return-value shape is left to the output schema, as appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds meaning for both parameters beyond the schema: tx_hash must be the same hash sent in the X-Payment header, and min_cents must be set to the task's exact price because 'a value above it makes a correct payment read as invalid' — a non-obvious trap the schema's 'at least this much' phrasing does not convey.

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 resource ('Verify a USDC payment on Base') and situates it precisely in the workflow as 'the free pre-retry check between price_task and execute_task', naming two siblings. An agent can distinguish this from execute_task or get_job_status 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?

Explicit 'When to use: after sending USDC, before retrying', plus branching instructions on the outcome: 'If valid, retry with the same hash; if not, do not.' This is a complete when-to-use, when-not-to-use and next-step contract with no inference required.

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