Skip to main content
Glama

prepare_payment

SPENDING: creates the purchase order ON BEHALF OF YOUR OWNER (you act as your owner; the purchase, the download and the receipt are theirs) and leaves it ready for YOU to pay with your own linked wallet (link_wallet) using deposit_data: nobody signs in the browser and the MCP never signs nor moves funds. It requires confirm=true after checking the total with quote_purchase. Refunds of that order go back to your wallet, and only you can open or withdraw its dispute (open_dispute, withdraw_dispute). A new account may get [NEW_WALLET_LIMIT].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesSlug of the template to buy.
dryRunNoDRY RUN. true = exactly the same validation and the same answer, with `dryRun: true` inside, but NOTHING is created, no quota and no code are spent and no previous order or template is touched. It is there to test an integration without spending. The same gates of a real purchase are checked (payments operational, template buyable, not yours, no payment in progress), the `quoteId` against today's total and the paying wallet. The order is NOT created, no previous order is cancelled or resumed and the discount code is not consumed: that is why `orderId` and `purchaseId` come back as null, with `livePreviousOrderId` saying whether you already have a live order for that template. A dry run is NOT a purchase and creates no obligation whatsoever.
confirmYesMANDATORY true. It confirms that the EXACT total returned by quote_purchase is accepted: if you act on behalf of a person, show it to them and wait for their explicit confirmation; if you are an agent account, apply your own spending policy. This creates a purchase order in the name of the account. It is NOT the consent to the immediate download: the response returns that text and how it is accepted (by completing the purchase: on the payment page for a person, when asking for deposit_data for an agent account; in no case is there a checkbox or an extra parameter).
quoteIdNoThe `quoteId` that quote_purchase returned, as is. It is HOW you declare which total is being accepted: if today's total is not that one (the price, the discount or the fee changed), the call is rejected with [PRICE_CHANGED] and NO order is created, instead of buying for an amount nobody saw. Optional for compatibility: without it the purchase goes at today's price, whatever it is. Send it whenever you can.
promoCodeNoSeller's discount code (optional).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesAlways true: a failure travels as an error, not here.
payAtNoOnly for a person: the link where they sign the payment with their wallet.
dryRunNoOnly in a dry run: no order was created and nothing was touched.
consentYesWhat is accepted when completing the purchase and how it is accepted.
orderIdYesThe uuid of the order; null in a dry run, because none was created.
resumedYestrue = a previous unpaid order was returned instead of creating another one.
warningNoNotice that the discount could not be verified and the total is the list price.
nextStepNoWhat to do next. In a real purchase, and for whoever signs by themselves, `deposit_data`; in a DRY RUN, repeat this same call without `dryRun` (there is no order to fund).
totalUsdcYesTotal of the purchase in USDC (decimal string).
purchaseIdYesThe orderHash by which the purchase is named outside; null in a dry run.
instructionsYesWhat to do now, in one sentence.
livePreviousOrderIdNoOnly in a dry run: the live order that the real call would resume or cancel.
nextStepAfterRealCallNoOnly in a dry run and only for whoever signs by themselves: what would come AFTER the real purchase (deposit_data).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • removedInput schema / allOf
      Removed value: -[
      -  {
      -    "anyOf": [
      -      {
      -        "required": [
      -          "confirm"
      -        ]
      -      },
      -      {
      -        "required": [
      -          "confirmar"
      -        ]
      -      }
      -    ]
      -  }
      -]
    • removedInput schema / properties / codigoPromo
      Removed value: -{
      -  "deprecated": true,
      -  "description": "DEPRECATED alias of `promoCode`: it still works, but use `promoCode` (it will be removed in a future round, no date yet). Seller's discount code (optional).",
      -  "type": "string"
      -}
    • removedInput schema / properties / confirmar
      Removed value: -{
      -  "deprecated": true,
      -  "description": "DEPRECATED alias of `confirm`: it still works, but use `confirm` (it will be removed in a future round, no date yet). MANDATORY true. It confirms that the EXACT total returned by quote_purchase is accepted: if you act on behalf of a person, show it to them and wait for their explicit confirmation; if you are an agent account, apply your own spending policy. This creates a purchase order in the name of the account. It is NOT the consent to the immediate download: the response returns that text and how it is accepted (by completing the purchase: on the payment page for a person, when asking for deposit_data for an agent account; in no case is there a checkbox or an extra parameter).",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / quoteId / description
      Previous value: -"The `quoteId` that quote_purchase returned, as is. It is HOW you declare which total is being accepted: if today's total is not that one (the price, the discount or the fee changed), the call is rejected with [PRECIO_CAMBIADO] and NO order is created, instead of buying for an amount nobody saw. Optional for compatibility: without it the purchase goes at today's price, whatever it is. Send it whenever you can."New value: +"The `quoteId` that quote_purchase returned, as is. It is HOW you declare which total is being accepted: if today's total is not that one (the price, the discount or the fee changed), the call is rejected with [PRICE_CHANGED] and NO order is created, instead of buying for an amount nobody saw. Optional for compatibility: without it the purchase goes at today's price, whatever it is. Send it whenever you can."
    • changedInput schema / required
      Previous value: -[
      -  "slug"
      -]New value: +[
      +  "slug",
      +  "confirm"
      +]
    • removedInput schema / x-bernuvia-aliases
      Removed value: -{
      -  "confirm": "confirmar",
      -  "promoCode": "codigoPromo"
      -}
  2. Changed24 schema fields changed
    • changedInput schema / properties / codigoPromo / description
      Previous value: -"ALIAS RETIRADO de `promoCode`: sigue funcionando, pero usa `promoCode` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `promoCode`. Código de descuento del vendedor (opcional)."New value: +"DEPRECATED alias of `promoCode`: it still works, but use `promoCode` (it will be removed in a future round, no date yet). Seller's discount code (optional)."
    • changedInput schema / properties / confirm / description
      Previous value: -"OBLIGATORIO true. Confirma que se acepta el total EXACTO que devolvió quote_purchase: si actúas por una persona, muéstraselo y espera su confirmación explícita; si eres una cuenta-agente, aplica tu propia política de gasto. Esto crea una orden de compra a nombre de la cuenta. NO equivale al consentimiento a la descarga inmediata: la respuesta devuelve ese texto y cómo se acepta (completando la compra: en la página de pago para una persona, al pedir deposit_data para una cuenta-agente; en ningún caso hay casilla ni parámetro adicional)."New value: +"MANDATORY true. It confirms that the EXACT total returned by quote_purchase is accepted: if you act on behalf of a person, show it to them and wait for their explicit confirmation; if you are an agent account, apply your own spending policy. This creates a purchase order in the name of the account. It is NOT the consent to the immediate download: the response returns that text and how it is accepted (by completing the purchase: on the payment page for a person, when asking for deposit_data for an agent account; in no case is there a checkbox or an extra parameter)."
    • changedInput schema / properties / confirmar / description
      Previous value: -"ALIAS RETIRADO de `confirm`: sigue funcionando, pero usa `confirm` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `confirm`. OBLIGATORIO true. Confirma que se acepta el total EXACTO que devolvió quote_purchase: si actúas por una persona, muéstraselo y espera su confirmación explícita; si eres una cuenta-agente, aplica tu propia política de gasto. Esto crea una orden de compra a nombre de la cuenta. NO equivale al consentimiento a la descarga inmediata: la respuesta devuelve ese texto y cómo se acepta (completando la compra: en la página de pago para una persona, al pedir deposit_data para una cuenta-agente; en ningún caso hay casilla ni parámetro adicional)."New value: +"DEPRECATED alias of `confirm`: it still works, but use `confirm` (it will be removed in a future round, no date yet). MANDATORY true. It confirms that the EXACT total returned by quote_purchase is accepted: if you act on behalf of a person, show it to them and wait for their explicit confirmation; if you are an agent account, apply your own spending policy. This creates a purchase order in the name of the account. It is NOT the consent to the immediate download: the response returns that text and how it is accepted (by completing the purchase: on the payment page for a person, when asking for deposit_data for an agent account; in no case is there a checkbox or an extra parameter)."
    • changedInput schema / properties / dryRun / description
      Previous value: -"ENSAYO EN SECO. true = se valida exactamente lo mismo y se devuelve la misma respuesta, con `dryRun: true` dentro, pero NO se crea nada, no se consume ningún cupo ni código y no se toca ninguna orden ni plantilla anterior. Sirve para probar una integración sin gastar. Se comprueban las mismas puertas de la compra (pagos operativos, plantilla comprable, no es tuya, sin pago en curso), el `quoteId` contra el total de hoy y la wallet pagadora. NO se crea la orden, no se cancela ni se reanuda ninguna orden anterior y no se consume el código: por eso `orderId` y `purchaseId` vienen a null, con `livePreviousOrderId` diciendo si ya tienes una orden viva de esa plantilla. Un ensayo NO es una compra ni crea obligación ninguna. / Dry run: validates the same and answers the same shape with `dryRun: true`, creating nothing and spending nothing."New value: +"DRY RUN. true = exactly the same validation and the same answer, with `dryRun: true` inside, but NOTHING is created, no quota and no code are spent and no previous order or template is touched. It is there to test an integration without spending. The same gates of a real purchase are checked (payments operational, template buyable, not yours, no payment in progress), the `quoteId` against today's total and the paying wallet. The order is NOT created, no previous order is cancelled or resumed and the discount code is not consumed: that is why `orderId` and `purchaseId` come back as null, with `livePreviousOrderId` saying whether you already have a live order for that template. A dry run is NOT a purchase and creates no obligation whatsoever."
    • changedInput schema / properties / promoCode / description
      Previous value: -"Código de descuento del vendedor (opcional)."New value: +"Seller's discount code (optional)."
    • changedInput schema / properties / quoteId / description
      Previous value: -"El `quoteId` que devolvió quote_purchase, tal cual. Es CÓMO se declara qué total se está aceptando: si el total de hoy no es ese (cambió el precio, el descuento o la comisión), la llamada se rechaza con [PRECIO_CAMBIADO] y NO se crea ninguna orden, en vez de comprar por un importe que nadie vio. Opcional por compatibilidad: sin él se compra al precio de hoy, sea cual sea. Mándalo siempre que puedas."New value: +"The `quoteId` that quote_purchase returned, as is. It is HOW you declare which total is being accepted: if today's total is not that one (the price, the discount or the fee changed), the call is rejected with [PRECIO_CAMBIADO] and NO order is created, instead of buying for an amount nobody saw. Optional for compatibility: without it the purchase goes at today's price, whatever it is. Send it whenever you can."
    • changedInput schema / properties / slug / description
      Previous value: -"Slug de la plantilla a comprar."New value: +"Slug of the template to buy."
    • changedOutput schema / properties / consent / description
      Previous value: -"Lo que se acepta al completar la compra y cómo se acepta."New value: +"What is accepted when completing the purchase and how it is accepted."
    • changedOutput schema / properties / consent / properties / bindingLang / description
      Previous value: -"Solo para cuentas-agente: el idioma vinculante (\"en\")."New value: +"Only for agent accounts: the binding language (\"en\")."
    • changedOutput schema / properties / consent / properties / howToAccept / description
      Previous value: -"Cómo se acepta: pagando o pidiendo deposit_data."New value: +"How it is accepted: by paying or by asking for deposit_data."
    • changedOutput schema / properties / consent / properties / text / description
      Previous value: -"El texto en el idioma del token."New value: +"The text in the language of the token."
    • changedOutput schema / properties / consent / properties / textEn / description
      Previous value: -"Solo para cuentas-agente: el mismo texto en inglés, que es el vinculante."New value: +"Only for agent accounts: the same text in English, which is the binding one."
    • changedOutput schema / properties / dryRun / description
      Previous value: -"Solo en un ensayo en seco: no se creó ninguna orden ni se tocó nada."New value: +"Only in a dry run: no order was created and nothing was touched."
    • changedOutput schema / properties / instructions / description
      Previous value: -"Qué hacer ahora, en una frase."New value: +"What to do now, in one sentence."
    • changedOutput schema / properties / livePreviousOrderId / description
      Previous value: -"Solo en un ensayo: la orden viva que la llamada de verdad reanudaría o cancelaría."New value: +"Only in a dry run: the live order that the real call would resume or cancel."
    • changedOutput schema / properties / nextStep / description
      Previous value: -"Qué hacer a continuación. En una compra de verdad y para quien firma él mismo, `deposit_data`; en un ENSAYO, repetir esta misma llamada sin `dryRun` (no hay ninguna orden que fondear)."New value: +"What to do next. In a real purchase, and for whoever signs by themselves, `deposit_data`; in a DRY RUN, repeat this same call without `dryRun` (there is no order to fund)."
    • changedOutput schema / properties / nextStepAfterRealCall / description
      Previous value: -"Solo en un ensayo y solo para quien firma él mismo: qué vendría DESPUÉS de la compra de verdad (deposit_data)."New value: +"Only in a dry run and only for whoever signs by themselves: what would come AFTER the real purchase (deposit_data)."
    • changedOutput schema / properties / ok / description
      Previous value: -"Siempre true: un fallo viaja como error, no aquí."New value: +"Always true: a failure travels as an error, not here."
    • changedOutput schema / properties / orderId / description
      Previous value: -"El uuid de la orden; null en un ensayo en seco, porque no se creó ninguna."New value: +"The uuid of the order; null in a dry run, because none was created."
    • changedOutput schema / properties / payAt / description
      Previous value: -"Solo para una persona: el enlace donde firma el pago con su wallet."New value: +"Only for a person: the link where they sign the payment with their wallet."
    • changedOutput schema / properties / purchaseId / description
      Previous value: -"El orderHash con el que se nombra la compra fuera; null en un ensayo."New value: +"The orderHash by which the purchase is named outside; null in a dry run."
    • changedOutput schema / properties / resumed / description
      Previous value: -"true = se devolvió una orden anterior sin pagar en vez de crear otra."New value: +"true = a previous unpaid order was returned instead of creating another one."
    • changedOutput schema / properties / totalUsdc / description
      Previous value: -"Total de la compra en USDC (cadena decimal)."New value: +"Total of the purchase in USDC (decimal string)."
    • changedOutput schema / properties / warning / description
      Previous value: -"Aviso de que el descuento no se pudo verificar y el total es el de lista."New value: +"Notice that the discount could not be verified and the total is the list price."
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and discharges it: it states nobody signs in the browser, the MCP never signs nor moves funds, refunds return to the agent's wallet, only the agent can open/withdraw the dispute, and new accounts may hit a wallet limit. These are exactly the behavioral traits an agent cannot infer from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The 'SPENDING:' label front-loads the core action, but the body is a dense run-on that mixes scope, ownership, payment routing, disputes, and dry-run caveats with heavy overlap on the schema's param text. Much earns its place, yet the wall-of-text format hurts scannability.

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?

An output schema exists, so return values need not be explained. For a complex spending/mutation tool with no annotations, the description covers ownership, signing, funds movement, refunds, dispute rights, and dry-run behavior, leaving only minor gaps around quota/limit edge cases.

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 the schema's own parameter descriptions are already unusually rich (dryRun, confirm, quoteId semantics fully spelled out). The description reiterates the confirm=true requirement and dryRun intent but adds little parameter meaning beyond what the schema provides, so the baseline of 3 is appropriate.

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 description opens with a specific verb and resource ('creates the purchase order ON BEHALF OF YOUR OWNER') and immediately scopes it against alternatives ('leaves it ready for YOU to pay ... using deposit_data'). An agent can distinguish this from quote_purchase, link_wallet, and deposit_data 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?

It names the prerequisite flow explicitly ('requires confirm=true after checking the total with quote_purchase'), routes the payment step to link_wallet/deposit_data, and routes post-purchase actions to open_dispute/withdraw_dispute. When and how to use it is fully specified rather than inferred.

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