Skip to main content
Glama

ChainGuard Web3 Security & DeFi MCP

create_usdt_invoice

Create a new non-custodial multi-chain USDT/USDC payment invoice and hosted checkout page on Polygon, BSC, Arbitrum, Base, Ethereum, or Solana settling 100% directly to merchant_wallet with 0% platform custody. State-changing operation creating a single-use pending invoice record (unlimited free calls, no authentication required). Supports recurring SaaS subscriptions via optional customer_ref and billing_days. Returns JSON with ok (boolean), checkout_url (hosted payment page), and invoice (invoice_id, status, amount_usd, network, merchant_wallet, expires_at).

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": {
      "title": "<title>",
      "amount_usd": "<amount_usd>",
      "network": "<network>",
      "merchant_wallet": "<merchant_wallet>"
    },
    "name": "create_usdt_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesHuman-readable product, order, or subscription plan title displayed on the hosted checkout page (2-140 chars).
networkYesSettlement blockchain network (`polygon`, `bsc`, `base`, `arbitrum`, `ethereum`, or `solana`). Defaults to `polygon`.polygon
amount_usdYesExact invoice price denominated in USD (settled 1:1 in USDT or USDC on-chain, e.g. `19.0`). Must be >= `0.01`.
ttl_minutesNoInvoice expiration window in minutes (`5` to `43200`). After `ttl_minutes`, unpaid invoices cannot be settled. Defaults to `60`.
webhook_urlNoOptional HTTPS URL to receive an HMAC-SHA256 signed `invoice.paid` POST webhook upon on-chain settlement.
billing_daysNoOptional subscription duration in days (e.g. `30` for monthly, `365` for annual). Pass `0` for one-time purchases.
customer_refNoOptional external customer identifier (e.g. email, user ID, or Telegram ID) for tracking recurring subscription status.
merchant_walletYesMerchant's self-custody receiving wallet address (`0x...` for EVM chains or base58 public key for `solana`). Funds transfer directly here.

Output Schema

NameRequiredDescriptionDefault
okYes
invoiceNo
checkout_urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / amount_usd / description
      Added value: +"Exact invoice price denominated in USD (settled 1:1 in USDT or USDC on-chain, e.g. `19.0`). Must be >= `0.01`."
    • addedInput schema / properties / billing_days
      Added value: +{
      +  "default": 0,
      +  "description": "Optional subscription duration in days (e.g. `30` for monthly, `365` for annual). Pass `0` for one-time purchases.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / customer_ref
      Added value: +{
      +  "default": "",
      +  "description": "Optional external customer identifier (e.g. email, user ID, or Telegram ID) for tracking recurring subscription status.",
      +  "type": "string"
      +}
    • addedInput schema / properties / merchant_wallet / description
      Added value: +"Merchant's self-custody receiving wallet address (`0x...` for EVM chains or base58 public key for `solana`). Funds transfer directly here."
    • addedInput schema / properties / network / description
      Added value: +"Settlement blockchain network (`polygon`, `bsc`, `base`, `arbitrum`, `ethereum`, or `solana`). Defaults to `polygon`."
    • addedInput schema / properties / network / enum
      Added value: +[
      +  "polygon",
      +  "bsc",
      +  "base",
      +  "arbitrum",
      +  "ethereum",
      +  "solana"
      +]
    • addedInput schema / properties / title / description
      Added value: +"Human-readable product, order, or subscription plan title displayed on the hosted checkout page (2-140 chars)."
    • addedInput schema / properties / ttl_minutes / description
      Added value: +"Invoice expiration window in minutes (`5` to `43200`). After `ttl_minutes`, unpaid invoices cannot be settled. Defaults to `60`."
    • addedInput schema / properties / webhook_url / description
      Added value: +"Optional HTTPS URL to receive an HMAC-SHA256 signed `invoice.paid` POST webhook upon on-chain settlement."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "checkout_url": {
      +      "type": "string"
      +    },
      +    "invoice": {
      +      "type": "object"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false, and destructiveHint=false, and the description is consistent with all of them. It adds genuinely useful non-annotated context: non-custodial 0% custody settlement, single-use pending record semantics, no authentication, and no call quota. It does not discuss failure modes (e.g., what happens on TTL expiry or unsupported wallet format), which would push this higher.

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?

Front-loaded with the core action and settlement model, then the operation's behavioral traits, then the return shape — a sensible ordering with no filler sentences. There is mild redundancy: 'non-custodial' is restated as '0% platform custody', and the return-shape sentence duplicates what the output schema already declares.

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 an 8-parameter creation tool with full schema coverage, annotations, and an output schema, the description covers everything the structured fields do not: custody model, state-changing nature, no-auth/free-call policy, recurring-subscription support, and chain set. Nothing an agent needs in order to decide 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% with all eight parameters documented in the schema, so the baseline is 3. The description adds only marginal meaning beyond that — it clarifies that `customer_ref` and `billing_days` together drive recurring subscription tracking and that `merchant_wallet` is the direct settlement destination, both of which the schema already states.

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 (create a non-custodial multi-chain USDT/USDC payment invoice plus hosted checkout page), enumerates the six supported chains, and describes the settlement model (100% to merchant_wallet, 0% custody). An agent can tell this is an invoice-creation tool distinct from verify_usdt_invoice or the sweep/audit siblings without opening the 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?

Gives clear usage context: state-changing operation, single-use `pending` invoice, unlimited free calls, no authentication required, and optional recurring subscriptions via `customer_ref`/`billing_days`. It does not name a sibling or state when-not-to-use (e.g., use the verify tool to check payment status), so it stops short of explicit routing 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.