Skip to main content
Glama

Tanatasa Beauty

prepare_payment

Idempotent

Get the hosted Stripe payment link, only after the buyer approved buyer_summary (details and total): send buyer_confirmed=true, that details_version, that total and an idempotency_key (reuse it on retries, and to get a fresh link if an unpaid link expired). Creates an unpaid order; nothing is charged until the buyer, or an agent they explicitly authorized, pays on Stripe. The result says when the link expires. Then check get_order.

Input Schema

NameRequiredDescriptionDefault
checkout_idYescheckout_id from create_checkout or checkout_session.
guest_tokenNoPrivate guest session token from create_cart. Retain for cart, checkout and purchase-status calls; no account login needed.
expected_totalYesThe total the buyer confirmed, in SGD cents.
buyer_confirmedYestrue only after the buyer confirmed these details and this total.
details_versionYesThe details_version the buyer confirmed.
idempotency_keyYesA new random key per purchase. Retry with the same key and exact input; never reuse it for a different purchase.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "anyOf": [
      -    {
      -      "$schema": "http://json-schema.org/draft-07/schema#",
      -      "additionalProperties": true,
      -      "properties": {
      -        "checkout_id": {
      -          "type": "string"
      -        },
      -        "currency": {
      -          "const": "SGD",
      -          "type": "string"
      -        },
      -        "money_unit": {
      -          "const": "cents",
      -          "type": "string"
      -        },
      -        "next_action": {
      -          "type": "string"
      -        },
      -        "order_id": {
      -          "type": "string"
      -        },
      -        "payment_confirmed": {
      -          "const": false,
      -          "type": "boolean"
      -        },
      -        "payment_status": {
      -          "const": "pending",
      -          "type": "string"
      -        },
      -        "payment_url": {
      -          "format": "uri",
      -          "type": "string"
      -        },
      -        "payment_url_expires_at": {
      -          "anyOf": [
      -            {
      -              "format": "date-time",
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "total": {
      -          "description": "Integer SGD cents; 1690 means S$16.90.",
      -          "minimum": 0,
      -          "type": "integer"
      -        }
      -      },
      -      "required": [
      -        "currency",
      -        "money_unit",
      -        "checkout_id",
      -        "order_id",
      -        "payment_url",
      -        "payment_url_expires_at",
      -        "total",
      -        "payment_status",
      -        "payment_confirmed",
      -        "next_action"
      -      ],
      -      "type": "object"
      -    },
      -    {
      -      "additionalProperties": true,
      -      "properties": {
      -        "error": {
      -          "additionalProperties": true,
      -          "properties": {
      -            "code": {
      -              "type": "string"
      -            },
      -            "message": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "code",
      -            "message"
      -          ],
      -          "type": "object"
      -        }
      -      },
      -      "required": [
      -        "error"
      -      ],
      -      "type": "object"
      -    }
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "$schema": "http://json-schema.org/draft-07/schema#",
      +      "additionalProperties": true,
      +      "properties": {
      +        "checkout_id": {
      +          "type": "string"
      +        },
      +        "currency": {
      +          "const": "SGD",
      +          "type": "string"
      +        },
      +        "money_unit": {
      +          "const": "cents",
      +          "type": "string"
      +        },
      +        "next_action": {
      +          "type": "string"
      +        },
      +        "order_id": {
      +          "type": "string"
      +        },
      +        "payment_confirmed": {
      +          "const": false,
      +          "type": "boolean"
      +        },
      +        "payment_status": {
      +          "const": "pending",
      +          "type": "string"
      +        },
      +        "payment_url": {
      +          "format": "uri",
      +          "type": "string"
      +        },
      +        "payment_url_expires_at": {
      +          "anyOf": [
      +            {
      +              "format": "date-time",
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "total": {
      +          "description": "Integer SGD cents; 1690 means S$16.90.",
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "currency",
      +        "money_unit",
      +        "checkout_id",
      +        "order_id",
      +        "payment_url",
      +        "payment_url_expires_at",
      +        "total",
      +        "payment_status",
      +        "payment_confirmed",
      +        "next_action"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": true,
      +      "properties": {
      +        "error": {
      +          "additionalProperties": true,
      +          "properties": {
      +            "code": {
      +              "type": "string"
      +            },
      +            "message": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "code",
      +            "message"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  3. Changed5 schema fields changed
    • addedInput schema / properties / buyer_confirmed / description
      Added value: +"true only after the buyer confirmed these details and this total."
    • addedInput schema / properties / checkout_id / description
      Added value: +"checkout_id from create_checkout or checkout_session."
    • addedInput schema / properties / details_version / description
      Added value: +"The details_version the buyer confirmed."
    • addedInput schema / properties / expected_total / description
      Added value: +"The total the buyer confirmed, in SGD cents."
    • addedInput schema / properties / idempotency_key / description
      Added value: +"A new random key per purchase. Retry with the same key and exact input; never reuse it for a different purchase."
  4. Added

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the side effect (creates an unpaid order), that no money moves until payment on Stripe, that the response carries a link expiry, and how the idempotency key behaves on retries versus an expired link. The phrasing about reusing the key to obtain a fresh link after expiry is slightly compressed and could be misread, which keeps this just short of a 5.

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-loads the action and the gate, and nearly every clause carries information (precondition, side effect, expiry, retry rule, next step). The nested parenthetical about the idempotency key is the one spot where compression costs a little readability.

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 6-parameter mutation with no output schema, it covers the critical unknowns: the confirmation prerequisite, that nothing is charged, that a link with an expiry is returned, and what to call next. It leaves stale details_version / error behavior implicit, but an agent has enough to call it correctly.

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 earns more by explaining the cross-parameter relationship — that buyer_confirmed, details_version and expected_total must all reflect the same buyer approval. It adds intent rather than repeating field formats, though the exact mismatch/error semantics are not covered.

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 ('Get the hosted Stripe payment link') plus the precondition that gates it, so the agent knows exactly what this call produces. The follow-up pointer to get_order, plus the fact that it consumes buyer_summary, differentiates it from the checkout/cart siblings without needing their schemas opened.

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 an explicit when: only after the buyer approved buyer_summary, with buyer_confirmed=true matching that details_version and total. It also gives sequencing ('Then check get_order') and retry guidance for the idempotency_key, so the ordering against siblings is unambiguous.

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