Skip to main content
Glama

PayGate USDT Payment Gateway MCP

verify_usdt_invoice

Idempotent

Verify and settle a confirmed on-chain USDT/USDC transaction hash (tx_hash) against a PayGate invoice_id via live JSON-RPC receipt log inspection. Idempotent state-changing operation (unlimited free calls, anti-replay enforced): confirms recipient address, token contract, and minimum USD amount, transitions the invoice to paid, extends recurring subscription_expires_at if configured, and dispatches any configured webhook. Returns JSON with ok (boolean), already_paid (boolean), and updated invoice object.

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

Input Schema

NameRequiredDescriptionDefault
tx_hashYesConfirmed on-chain transaction hash (`0x...` 66-char hex on EVM chains or base58 signature on Solana) transferring USDT/USDC to the invoice's `merchant_wallet`.
invoice_idYesUnique PayGate invoice identifier returned by `create_usdt_invoice` (e.g. `inv_a1b2c3d4e5f6`).

Output Schema

NameRequiredDescriptionDefault
okYes
invoiceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / invoice_id / description
      Added value: +"Unique PayGate invoice identifier returned by `create_usdt_invoice` (e.g. `inv_a1b2c3d4e5f6`)."
    • addedInput schema / properties / tx_hash / description
      Added value: +"Confirmed on-chain transaction hash (`0x...` 66-char hex on EVM chains or base58 signature on Solana) transferring USDT/USDC to the invoice's `merchant_wallet`."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "invoice": {
      +      "type": "object"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false and idempotentHint=true, but the description goes well beyond them: it specifies the validation checks performed (recipient address, token contract, minimum USD amount), the side effects (invoice transitions to `paid`, recurring `subscription_expires_at` extension, webhook dispatch), and the anti-replay guarantee. That is exactly the mutation context an agent needs before invoking a state-changing tool.

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?

Two dense sentences with the operation, checks, and side effects front-loaded and no filler. The trailing sentence restating return fields (`ok`, `already_paid`, `invoice`) is partly redundant given an output schema exists, which keeps it from a 5.

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 state-changing, open-world verification tool, the definition covers preconditions, validation checks, state transitions, side effects, idempotency/anti-replay, and return shape. Nothing an agent needs in order to call it correctly is missing.

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 both parameters are already documented in the schema, including formats (0x hex vs base58) and the merchant_wallet target. The description only echoes the parameter names without adding syntax or edge-case meaning, which is the expected baseline 3 when the schema carries the load.

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 opens with a specific verb pair and resource: 'Verify and settle a confirmed on-chain USDT/USDC transaction hash (`tx_hash`) against a PayGate `invoice_id`'. It even names the mechanism (live JSON-RPC receipt log inspection) and the upstream sibling that produces the invoice (`create_usdt_invoice`), so an agent can distinguish this from creation/scan siblings 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the key precondition that the transaction must be 'confirmed' on-chain and clarifies this is idempotent with unlimited free calls and anti-replay, which tells the agent it is safe to retry. It does not explicitly exclude or route to a sibling alternative for unconfirmed/failed transactions, so it stops short of full when/when-not guidance.

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.