Skip to main content
Glama

Intents Checkout

Create a test invoice

create_invoice
Idempotent

Create a Checkout invoice priced in USD and get its hosted payment URL. The customer pays in any supported token on any chain; you receive your settlement asset at your own address. Also returns the clientSecret for an embedded widget. reference (your order ID) is required and makes retries safe. A test key makes a test invoice; with a live key, pass mode: "live" to confirm a real payment request.

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": {
      "amount": "<amount>",
      "reference": "<reference>"
    },
    "name": "create_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoMust match your key's mode. With a live key, pass "live" to confirm a real payment request; omit it with a test key.
amountYesPrice in USD, e.g. "49.00"
metadataNo
cancelUrlNo
referenceYesYour order ID. Required: it is the idempotency key, so a retried call returns the same invoice instead of a second one
successUrlNoWhere the customer goes after paying
descriptionNoWhat the customer is paying for
expiresInSecNo
customerEmailNo

Output Schema

NameRequiredDescriptionDefault
urlYes
modeYes
amountYes
statusYes
invoiceYes
summaryYes
currencyYes
expiresAtYes
invoiceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and openWorldHint=true, but the description adds the mechanism behind idempotency (the `reference` order ID makes retries safe and returns the same invoice) and discloses return payload contents (hosted payment URL plus `clientSecret` for an embedded widget). It also flags the safety-relevant test/live key gate, adding genuine context beyond the annotations, though it doesn't discuss limits or failure behavior.

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?

Four tight sentences, front-loaded with purpose and return value, then the idempotency contract, then the mode gate. Every sentence carries distinct information and nothing is repeated from the schema verbatim without added meaning.

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?

For a 9-parameter mutation tool with an output schema and full annotation coverage, the description supplies the essential mental model: what is created, what comes back, why `reference` matters, and how test versus live keys behave. Minor gaps in optional URL/email parameter semantics are acceptable given the schema documents them.

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?

With 56% schema description coverage across 9 parameters, the description usefully reinforces the two most consequential ones: `reference` as the idempotency key and `mode` as the live-payment confirmation flag, plus that `amount` is in USD. It says nothing about cancelUrl, successUrl, customerEmail, metadata, or expiresInSec, so it only partially compensates for the coverage gap.

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 opens with a specific verb and resource ("Create a Checkout invoice priced in USD") and states the primary output (hosted payment URL), which is far more informative than the title alone. It does not name or distinguish itself from siblings like create_payment_link or create_swap, so it falls short of the sibling-differentiation bar for a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It gives conditional guidance around mode ("A test key makes a test invoice; with a live key, pass mode: \"live\" to confirm a real payment request"), which is real when-to-use information. However, it never says when to prefer this over create_payment_link or other invoice-adjacent siblings, and offers no exclusions, so usage is implied rather than fully specified.

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.