Skip to main content
Glama

PayGate USDT Payment Gateway MCP

expire_usdt_invoice

Idempotent

Cancel and expire an unpaid pending PayGate invoice by invoice_id so it can no longer be settled. Idempotent state-changing operation: transitions pending invoices to expired while leaving already-paid invoices untouched (unlimited free calls). Returns JSON with ok (boolean) and the updated invoice object (status: "expired").

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>"
    },
    "name": "expire_usdt_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoice_idYesUnique PayGate invoice identifier (`inv_...`) to cancel/expire.
merchant_walletNoOptional merchant wallet address (`0x...` or Solana base58) to verify ownership before expiring the invoice.

Output Schema

NameRequiredDescriptionDefault
okYes
invoiceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so restating idempotency earns nothing new. Credit is due for the genuinely additive facts: paid invoices are left untouched (a no-op rather than an error) and calls are unlimited/free. It never says what happens if you target an already-expired invoice, which is the main uncovered behavior.

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?

Three dense, front-loaded sentences with no filler. The final sentence restating the return shape (`ok` plus `invoice` with status 'expired') duplicates the available output schema and is the one element that does not earn its place.

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?

Return values are covered by the output schema and safety semantics by the annotations, so the description's burden is behavioral, and it discharges most of it. The gaps are the edge-case outcome for an already-expired or paid invoice and the role of merchant_wallet during ownership checks.

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 documents both invoice_id and merchant_wallet. The description only echoes invoice_id and says nothing about the ownership-verification purpose of merchant_wallet or its format, so it adds no meaning beyond structured fields.

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?

Names a specific verb pair (cancel/expire), the resource (PayGate invoice), the addressing key (invoice_id), and the scope restriction (unpaid `pending` only). No sibling tool in the list performs cancellation, so an agent can route this unambiguously.

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?

States the trigger condition clearly ('unpaid pending invoice ... so it can no longer be settled') and implicitly excludes already-paid invoices. It stops short of stating what an agent should do instead when an invoice is paid or when it wants to read rather than cancel, so it lacks explicit alternative routing.

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.