Skip to main content
Glama

Get the payment link

complete_checkout
Destructive

Generate a Yoco card or Ozow instant-EFT payment link; this does NOT complete payment. Rejects cancelled checkouts and rechecks stock and totals first. An atomic claim prevents competing gateway calls. Returns payment_url or null plus status and message. Retain a successful URL: repeat calls return payment_pending with no URL. Gateway failures raise an error, send no payment-link email and require team review rather than an automatic retry. Poll get_order with customer_email for payment status.

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": {
      "checkout_id": "<checkout_id>"
    },
    "name": "complete_checkout"
  }
}

Input Schema

NameRequiredDescriptionDefault
checkout_idYesId of the checkout, as returned when the checkout was created (starts MCP_)
payment_methodNoOverrides any value set in create_checkout/update_checkout

Output Schema

NameRequiredDescriptionDefault
ap2No
itemsNo
statusYes
messageYes
currencyNo
customerNo
next_stepNo
total_zarNo
item_countNo
checkout_idYes
payment_urlYes
payment_methodNo
provider_referenceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / checkout_id / description
      Added value: +"Id of the checkout, as returned when the checkout was created (starts MCP_)"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the stock/total recheck, the atomic claim that blocks competing gateway calls, the exact return semantics (payment_url or null plus status/message), the idempotency trap where repeat calls return payment_pending with no URL, and that gateway failures raise an error and require team review rather than retry. This is precisely the operational context an agent needs before invoking a destructive, open-world mutation.

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?

Dense but front-loaded: purpose and the key non-goal come first, followed by preconditions, concurrency behavior, return contract, idempotency warning, failure policy, and the follow-up call. Every sentence carries distinct operational information with no filler.

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 destructive, open-world mutation with side effects (email sending, gateway calls) the description covers preconditions, atomicity, failure handling, idempotency, and next steps; output schema exists so return-format explanation is a bonus rather than a requirement. Nothing an agent needs before calling it is missing.

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 100%, so the baseline is 3; the description adds real meaning by translating the payment_method enum values into their gateway semantics (yoco = card, ozow = instant-EFT). It does not restate the override-vs-create_checkout precedence, which the schema already covers.

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 ("Generate a Yoco card or Ozow instant-EFT payment link") and immediately scopes it with "this does NOT complete payment", which separates it from checkout-creation and cancellation siblings. An agent can pick this tool without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit negative conditions (rejects cancelled checkouts, don't retry after gateway failure, don't rely on repeat calls after success) and a concrete follow-up path: "Poll get_order with customer_email for payment status." It names the alternative tool and the condition that selects it.

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.

Resources