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 confirmar=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 [LIMITE_WALLET_NUEVA].

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.
confirmNoMANDATORY 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 [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.
confirmarNoDEPRECATED 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).
promoCodeNoSeller's discount code (optional).
codigoPromoNoDEPRECATED 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).

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. 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."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description discloses critical behavioral traits: nobody signs in the browser, the MCP never signs nor moves funds, refunds go back to the owner's wallet, and only the owner can open or withdraw disputes. It also mentions the new-account limit [LIMITE_WALLET_NUEVA]. The dryRun parameter description adds extensive behavioral detail about what is and isn't touched during a dry run. No annotations are provided, so the description carries the full burden and does so thoroughly.

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?

The main description is dense but front-loaded with the most important facts (SPENDING, on behalf of owner, ready for you to pay). The parameter descriptions are long but earn their length by explaining critical safety and flow semantics. Slight redundancy between confirm and confirmar descriptions, but that's justified by the deprecation alias.

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?

The description covers the full workflow: prerequisite (quote_purchase), the confirmation requirement, the payment mechanism (deposit_data), the refund/dispute ownership, and the dry-run testing path. An output schema exists, so return values don't need to be described. For a financial purchase-preparation tool with no annotations, this is exceptionally complete.

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

Parameters5/5

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

Schema description coverage is 100%, so the schema already documents all parameters. The description adds value beyond the schema by explaining the confirm/confirmar semantics (what it does NOT do: no checkbox, no extra parameter), the quoteId's role in declaring the accepted total and the [PRECIO_CAMBIADO] rejection, and the dryRun's exact side-effect-free behavior. This goes well beyond the baseline.

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 'SPENDING: creates the purchase order ON BEHALF OF YOUR OWNER' and clearly distinguishes the tool's role: it prepares a purchase order for the owner to pay later via deposit_data, without signing or moving funds. It names the specific resource (purchase order) and the action (prepare for payment), and the contrast with quote_purchase and link_wallet helps differentiate it from siblings.

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?

The description explicitly states the required flow: check the total with quote_purchase, then call prepare_payment with confirmar=true. It also names the alternatives (link_wallet, open_dispute, withdraw_dispute) and clarifies when they apply. The dryRun parameter description further explains when to use a dry run versus a real purchase.

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