Skip to main content
Glama

Simulate a payment (test mode only)

simulate_payment

Test payment flows by paying an invoice or payment link in full, short, or over; confirm fulfillment, entitlements, receipts, and webhook events using test keys only.

Instructions

Simulate a payment (test mode only).

Test keys only. full pays the amount due: the invoice turns paid and is fulfilled — entitlements, license keys, a receipt, and the events your webhooks get. short sends half (underpaid), over a tenth more (overpaid); those two need the buyer's chain and asset chosen first. For full, an invoice with no chain yet gets one: chain and asset if given, else the first stablecoin offered (refund terms count as accepted).

Pass the invoice's id, or a payment_link id: then a test invoice is made for the link's price (as a buyer opening the link would) and paid.

Test keys only: refused with a live key.

Input Schema

NameRequiredDescriptionDefault
idNoThe invoice's id, `inv_…`.
assetNo
chainNo
outcomeNoDefault full.
payment_linkNoInstead of `id`: a payment link, `plink_…`, to buy from first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only tell the agent this is a non-readonly, open-world, non-idempotent, non-destructive write; the description adds the substantive behavior: the invoice becomes paid and fulfilled, entitlements and license keys are issued, a receipt is generated, and webhook events fire. It also discloses the hard access constraint — test keys only, refused with a live key — which is nowhere in the annotations and materially changes whether the call is attempted.

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?

Purpose and test-mode restriction are front-loaded, and every sentence carries information. It is dense and somewhat run-on, packing defaults, side effects, and preconditions into long em-dash clauses that take a second read to parse.

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 mutation tool with no output schema and 60% param coverage, the description covers what's created, what the outcome modes do, how chain/asset resolve, and the auth constraint. The only unchecked box is the exact response payload, which retrieve_payment can supply.

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

Parameters4/5

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

Schema coverage is 60%, and the description compensates for the gaps: `chain` and `asset` have no schema descriptions at all, yet the description explains their default resolution and the refund-terms-accepted side effect. It also clarifies the mutual exclusivity of `id` and `payment_link` and the default of `outcome` to `full`, plus the underpaid/overpaid semantics the enum names do 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?

The definition names a specific verb and resource (simulate a payment) and immediately scopes it to test mode, which separates it from every live-money sibling in the list (create_refund, pay_links, create_checkout_session). The follow-on sentences spell out exactly what the outcome variants mean, so the agent knows what the tool will actually do before 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?

It gives concrete preconditions: `short` and `over` need the buyer's chain and asset chosen first, and `full` will auto-select the first stablecoin when no chain exists. It also explains the id-vs-payment_link entry path. It stops short of naming alternatives (e.g. when to use pay_links or create_checkout_session instead), so no exclusions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.