Skip to main content
Glama

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; cloud callers may be held. 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.

Input Schema

NameRequiredDescriptionDefault
checkout_idYescheckout_id returned by create_checkout.
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: +"checkout_id returned by create_checkout."
  2. Changed3 schema fields changed
    • removedOutput schema / properties / created_at
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • changedOutput schema / properties / items / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": true,
      -      "properties": {
      -        "colour": {
      -          "type": "string"
      -        },
      -        "finish": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "height": {
      -          "type": "number"
      -        },
      -        "mountType": {
      -          "type": "string"
      -        },
      -        "price": {
      -          "type": "number"
      -        },
      -        "productId": {
      -          "type": "string"
      -        },
      -        "productName": {
      -          "type": "string"
      -        },
      -        "quantity": {
      -          "type": "number"
      -        },
      -        "total": {
      -          "type": "number"
      -        },
      -        "width": {
      -          "type": "number"
      -        }
      -      },
      -      "required": [],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "colour": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "drop_mm": {
      +          "type": "number"
      +        },
      +        "mount_type": {
      +          "type": "string"
      +        },
      +        "product_name": {
      +          "type": "string"
      +        },
      +        "product_slug": {
      +          "type": "string"
      +        },
      +        "quantity": {
      +          "type": "number"
      +        },
      +        "total_price": {
      +          "type": "number"
      +        },
      +        "unit_price": {
      +          "type": "number"
      +        },
      +        "width_mm": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / payment_status
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "allOf": [
      +    {
      +      "if": {
      +        "properties": {
      +          "payment_url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "payment_url"
      +        ]
      +      },
      +      "then": {
      +        "required": [
      +          "total_zar",
      +          "currency",
      +          "payment_method"
      +        ]
      +      }
      +    }
      +  ],
      +  "properties": {
      +    "ap2": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "merchant_authorization": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "merchant_authorization"
      +      ],
      +      "type": "object"
      +    },
      +    "checkout_id": {
      +      "type": "string"
      +    },
      +    "created_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "currency": {
      +      "const": "ZAR",
      +      "type": "string"
      +    },
      +    "customer": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "address": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "city": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "email": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "phone": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [],
      +      "type": "object"
      +    },
      +    "item_count": {
      +      "type": "number"
      +    },
      +    "items": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "colour": {
      +                "type": "string"
      +              },
      +              "finish": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "height": {
      +                "type": "number"
      +              },
      +              "mountType": {
      +                "type": "string"
      +              },
      +              "price": {
      +                "type": "number"
      +              },
      +              "productId": {
      +                "type": "string"
      +              },
      +              "productName": {
      +                "type": "string"
      +              },
      +              "quantity": {
      +                "type": "number"
      +              },
      +              "total": {
      +                "type": "number"
      +              },
      +              "width": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    },
      +    "payment_method": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "payment_status": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "payment_url": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "provider_reference": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "status": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "total_zar": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "checkout_id",
      +    "status",
      +    "payment_url",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and destructiveHint=true; the description goes far beyond by disclosing the stock/total recheck, the atomic claim blocking competing gateway calls, that cloud callers may be held, the exact return shape (payment_url or null plus status/message), and the failure contract (error raised, no payment-link email, no automatic retry). That is precisely the operational context annotations cannot express.

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?

Five short sentences, each carrying a distinct fact: what it does, the non-completion caveat, preconditions, concurrency behavior, return contract, and the retry/polling policy. The non-completion correction is front-loaded right after the purpose where it matters most.

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?

This is a claim-holding, financially consequential operation and the description covers preconditions, concurrency, return values, failure handling, and the follow-up polling step. Even though an output schema exists, the idempotency warning about retaining a successful URL is essential and is supplied here.

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% and both parameters are documented inline (checkout_id provenance, payment_method override behavior), so the description need not repeat them. It adds no further semantics about checkout_id or how the payment_method enum interacts with prior configuration, leaving it at the baseline for a fully-covered schema.

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 explicitly bounds scope with 'this does NOT complete payment', which separates it from anything an agent might assume about checkout finalization. Gateway options are named, so an agent knows what it gets 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 Guidelines5/5

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

Gives concrete when/when-not rules: rejected for cancelled checkouts, and on gateway failure the agent must escalate rather than auto-retry. It also routes the agent to the correct sibling for the next step ('Poll get_order with customer_email for payment status') and warns against re-calling by explaining that repeats return payment_pending with no URL.

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.