Skip to main content
Glama

quote_purchase

Works out the final price and the breakdown of a purchase WITHOUT creating the order, and returns a quoteId: the fingerprint of THAT total. Hand it to prepare_payment to buy exactly what was shown here; if the total had changed, the purchase is refused instead of being created for a different amount. The quote reserves nothing and does not consume the discount code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesSlug of the template to quote.
promoCodeNoSeller's discount code (optional).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYesNotice that quoting neither creates nor reserves anything.
feeBpsYesFee in basis points.
quoteIdYesFingerprint of THIS total, to declare it in prepare_payment.
discountYesThe discount applied, or null if there is none.
templateYesThe quoted template.
totalUsdcYesTotal to pay in USDC (decimal string).
totalUnitsYesThe same total in USDC minimal units (digit string).
walletReadyYesThe account that would pay already has a wallet activated.
listPriceUsdcYesList price in USDC (decimal string).
platformFeeUsdcYesPlatform fee in USDC (decimal string).
sellerCanBePaidYesThe seller can already be paid.
sellerReceivesUsdcYesWhat the seller keeps in USDC (decimal string).
discountNotVerifiedNoOnly when the code's verification quota ran out: it was quoted at list price without validating it.
immediateDownloadConsentYesText of what is accepted when buying, in the language of the token.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • 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 / x-bernuvia-aliases
      Removed value: -{
      -  "promoCode": "codigoPromo"
      -}
  2. Changed21 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 / promoCode / description
      Previous value: -"Código de descuento del vendedor (opcional)."New value: +"Seller's discount code (optional)."
    • changedInput schema / properties / slug / description
      Previous value: -"Slug de la plantilla a cotizar."New value: +"Slug of the template to quote."
    • changedOutput schema / properties / discount / description
      Previous value: -"El descuento aplicado, o null si no hay ninguno."New value: +"The discount applied, or null if there is none."
    • changedOutput schema / properties / discount / properties / percent / description
      Previous value: -"Porcentaje de descuento."New value: +"Discount percentage."
    • changedOutput schema / properties / discount / properties / savingsUsdc / description
      Previous value: -"Lo que se ahorra en USDC (cadena decimal)."New value: +"What is saved in USDC (decimal string)."
    • changedOutput schema / properties / discountNotVerified / description
      Previous value: -"Solo cuando se agotó el tope de comprobaciones del código: se cotizó a precio de lista sin validarlo."New value: +"Only when the code's verification quota ran out: it was quoted at list price without validating it."
    • changedOutput schema / properties / feeBps / description
      Previous value: -"Comisión en puntos básicos."New value: +"Fee in basis points."
    • changedOutput schema / properties / immediateDownloadConsent / description
      Previous value: -"Texto de lo que se acepta al comprar, en el idioma del token."New value: +"Text of what is accepted when buying, in the language of the token."
    • changedOutput schema / properties / listPriceUsdc / description
      Previous value: -"Precio de lista en USDC (cadena decimal)."New value: +"List price in USDC (decimal string)."
    • changedOutput schema / properties / note / description
      Previous value: -"Aviso de que cotizar no crea ni reserva nada."New value: +"Notice that quoting neither creates nor reserves anything."
    • changedOutput schema / properties / platformFeeUsdc / description
      Previous value: -"Comisión de la plataforma en USDC (cadena decimal)."New value: +"Platform fee in USDC (decimal string)."
    • changedOutput schema / properties / quoteId / description
      Previous value: -"Huella de ESTE total, para declararlo en prepare_payment."New value: +"Fingerprint of THIS total, to declare it in prepare_payment."
    • changedOutput schema / properties / sellerCanBePaid / description
      Previous value: -"El vendedor ya puede cobrar."New value: +"The seller can already be paid."
    • changedOutput schema / properties / sellerReceivesUsdc / description
      Previous value: -"Lo que conserva el vendedor en USDC (cadena decimal)."New value: +"What the seller keeps in USDC (decimal string)."
    • changedOutput schema / properties / template / description
      Previous value: -"La plantilla cotizada."New value: +"The quoted template."
    • changedOutput schema / properties / template / properties / name / description
      Previous value: -"Nombre público de la plantilla."New value: +"Public name of the template."
    • changedOutput schema / properties / template / properties / slug / description
      Previous value: -"Slug de la plantilla."New value: +"Slug of the template."
    • changedOutput schema / properties / totalUnits / description
      Previous value: -"El mismo total en unidades mínimas de USDC (cadena de dígitos)."New value: +"The same total in USDC minimal units (digit string)."
    • changedOutput schema / properties / totalUsdc / description
      Previous value: -"Total a pagar en USDC (cadena decimal)."New value: +"Total to pay in USDC (decimal string)."
    • changedOutput schema / properties / walletReady / description
      Previous value: -"La cuenta que pagaría ya tiene wallet activada."New value: +"The account that would pay already has a wallet activated."
  3. First observed

TDQS

A4.9/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 does so: it discloses that no order is created, that the quoteId is a fingerprint of that specific total, that a stale total causes refusal rather than a wrong-amount purchase, and that nothing is reserved and the promo code is not consumed. These are exactly the side-effect facts an agent needs before calling.

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?

Four short sentences, front-loaded with what the tool does, then the quoteId contract, then the routing to prepare_payment, then the side-effect caveats. Every sentence carries information an agent acts on; 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?

The output schema exists, so return values need no explanation, yet the description still explains what the quoteId is for. Combined with the no-side-effects disclosure and the refusal-on-changed-total behavior, an agent has everything needed to call it and use the result 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 description coverage is 100%, so the two params (slug, promoCode) are already documented and the baseline is 3. The description adds real semantic value for promoCode by clarifying that the quote does not consume it, which affects whether an agent can safely re-quote.

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 states a specific verb+resource: it computes the final price and breakdown of a purchase without creating the order, and returns a quoteId. It also distinguishes itself from the sibling prepare_payment by naming where its output goes.

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 tells the agent exactly when to use this tool (to see a total before buying) and routes to the alternative: hand the quoteId to prepare_payment to buy exactly what was shown. It also states the negative case — the purchase is refused if the total changed — so nothing is left to inference.

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