Skip to main content
Glama

cancel_deposit_authorization

Withdraws a gasless-deposit authorization you already handed over (while the quote is alive, anyone holding it and your signature could send the deposit). Say WHICH one with the nonce deposit_data gave you in unaSolaFirma.nonce (which works even if the order already has a newer quote, and is the way not to leave live signatures behind) or, for an order's current quote, with { ordenId, cotizacion }, which Bernuvia verifies and derives the nonce from. The authorizer is always set by the server (your paying wallet), so a signature of yours can only burn your own authorizations. Without a signature it returns the typedData CancelAuthorization(authorizer, nonce) to sign; with a signature it returns the USDC.cancelAuthorization calldata for you to send, or with retransmitir:true Bernuvia sends it paying the gas (same limits as the deposit). Once it is confirmed, the order is only closed if its quote can no longer be redeemed; the answer says whether it ended up closed (ordenCerrada). If the authorization was already used or cancelled, it says so.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
firmaNoDEPRECATED alias of `signature`: it still works, but use `signature` (it will be removed in a future round, no date yet). Optional. Your EIP-712 signature of the CancelAuthorization typedData that this same function returns when called without a signature (0x + 130 hex).
nonceNoThe `nonce` (bytes32) of the authorization you want to withdraw, exactly as deposit_data returned it in `unaSolaFirma.nonce`. With it that authorization is withdrawn EVEN IF the order already has a newer quote: it is the route to use so as not to leave live signatures behind. Send `nonce` or `cotizacion`.
quoteNoOptional (requires `ordenId`): the `cotizacion` object returned by deposit_data({ ordenId, una_sola_firma: true }), AS IS. Bernuvia verifies it and derives the nonce from it. It works for the CURRENT quote of that order; if you already requested another quote, use `nonce`.
ordenIdNoDEPRECATED alias of `orderId`: it still works, but use `orderId` (it will be removed in a future round, no date yet). The ordenId (uuid) of the order whose authorization you want to withdraw. Optional if you send `nonce`; with it, the order is also closed when the cancellation is confirmed.
orderIdNoThe ordenId (uuid) of the order whose authorization you want to withdraw. Optional if you send `nonce`; with it, the order is also closed when the cancellation is confirmed.
broadcastNoOptional, together with firma. true = Bernuvia sends the cancellation and pays the gas (if sponsored gas is available); otherwise it returns the calldata so that you send it yourself.
signatureNoOptional. Your EIP-712 signature of the CancelAuthorization typedData that this same function returns when called without a signature (0x + 130 hex).
cotizacionNoDEPRECATED alias of `quote`: it still works, but use `quote` (it will be removed in a future round, no date yet). Optional (requires `ordenId`): the `cotizacion` object returned by deposit_data({ ordenId, una_sola_firma: true }), AS IS. Bernuvia verifies it and derives the nonce from it. It works for the CURRENT quote of that order; if you already requested another quote, use `nonce`.
retransmitirNoDEPRECATED alias of `broadcast`: it still works, but use `broadcast` (it will be removed in a future round, no date yet). Optional, together with firma. true = Bernuvia sends the cancellation and pays the gas (if sponsored gas is available); otherwise it returns the calldata so that you send it yourself.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nonceYesThe bytes32 of the authorization this response refers to.
estadoYesThe branch of the response: ya_no_vale, firma_requerida, lista_para_enviar, cancelacion_enviada or cancelada.
txHashNoOnly with "cancelacion_enviada" or "cancelada": hash of the transaction Bernuvia sent.
ordenIdNoThe uuid of the order, only if you named it in the call (when withdrawing by a bare `nonce` there may be none).
typedDataNoOnly with estado "firma_requerida": the EIP-712 CancelAuthorization message to sign with signTypedData.
transaccionNoOnly with estado "lista_para_enviar": the envelope ready to be sent from any wallet (what counts is the signature).
ordenCerradaNoOnly with "cancelada" and having named an order: whether the order was also closed (it is not closed while its quote can still be redeemed).
dominioOrigenNoOnly with "firma_requerida": where the EIP-712 domain came from, "cadena" (read from the token) or "asumido".
siguientePasoYesWhat to do now, in one sentence.
gasPatrocinadoNoOnly when Bernuvia sent it: true, the gas was paid by Bernuvia.
esDeLaCotizacionVigenteNoOnly when it was derived from a `cotizacion`: the nonce is the one of the current quote of that order. Absent if you gave it on its own (it cannot be asserted).
retransmisionDisponibleNoCan Bernuvia send the cancellation and pay the gas? Absent in the branches where it no longer applies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed31 schema fields changed
    • changedInput schema / properties / broadcast / description
      Previous value: -"Opcional, con firma. true = Bernuvia envía la cancelación pagando el gas (si el gas patrocinado está disponible); si no, devuelve el calldata para que la envíes tú."New value: +"Optional, together with firma. true = Bernuvia sends the cancellation and pays the gas (if sponsored gas is available); otherwise it returns the calldata so that you send it yourself."
    • changedInput schema / properties / cotizacion / description
      Previous value: -"ALIAS RETIRADO de `quote`: sigue funcionando, pero usa `quote` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `quote`. Opcional (hace falta `ordenId`): el objeto `cotizacion` que devolvió deposit_data({ ordenId, una_sola_firma: true }), TAL CUAL. Bernuvia lo verifica y deriva de él el nonce. Sirve para la cotización VIGENTE de esa orden; si ya pediste otra cotización, usa `nonce`."New value: +"DEPRECATED alias of `quote`: it still works, but use `quote` (it will be removed in a future round, no date yet). Optional (requires `ordenId`): the `cotizacion` object returned by deposit_data({ ordenId, una_sola_firma: true }), AS IS. Bernuvia verifies it and derives the nonce from it. It works for the CURRENT quote of that order; if you already requested another quote, use `nonce`."
    • changedInput schema / properties / firma / description
      Previous value: -"ALIAS RETIRADO de `signature`: sigue funcionando, pero usa `signature` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `signature`. Opcional. Tu firma EIP-712 del typedData CancelAuthorization que devuelve esta misma función sin firma (0x + 130 hex)."New value: +"DEPRECATED alias of `signature`: it still works, but use `signature` (it will be removed in a future round, no date yet). Optional. Your EIP-712 signature of the CancelAuthorization typedData that this same function returns when called without a signature (0x + 130 hex)."
    • changedInput schema / properties / nonce / description
      Previous value: -"El `nonce` (bytes32) de la autorización que quieres retirar, tal y como lo devolvió deposit_data en `unaSolaFirma.nonce`. Con él se retira esa autorización AUNQUE la orden ya tenga otra cotización más nueva: es la vía que hay que usar para no dejar firmas vivas detrás. Manda `nonce` o `cotizacion`."New value: +"The `nonce` (bytes32) of the authorization you want to withdraw, exactly as deposit_data returned it in `unaSolaFirma.nonce`. With it that authorization is withdrawn EVEN IF the order already has a newer quote: it is the route to use so as not to leave live signatures behind. Send `nonce` or `cotizacion`."
    • changedInput schema / properties / ordenId / description
      Previous value: -"ALIAS RETIRADO de `orderId`: sigue funcionando, pero usa `orderId` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `orderId`. El ordenId (uuid) de la orden cuya autorización quieres retirar. Opcional si mandas `nonce`; con él, además, se intenta cerrar la orden al confirmarse la cancelación."New value: +"DEPRECATED alias of `orderId`: it still works, but use `orderId` (it will be removed in a future round, no date yet). The ordenId (uuid) of the order whose authorization you want to withdraw. Optional if you send `nonce`; with it, the order is also closed when the cancellation is confirmed."
    • changedInput schema / properties / orderId / description
      Previous value: -"El ordenId (uuid) de la orden cuya autorización quieres retirar. Opcional si mandas `nonce`; con él, además, se intenta cerrar la orden al confirmarse la cancelación."New value: +"The ordenId (uuid) of the order whose authorization you want to withdraw. Optional if you send `nonce`; with it, the order is also closed when the cancellation is confirmed."
    • changedInput schema / properties / quote / description
      Previous value: -"Opcional (hace falta `ordenId`): el objeto `cotizacion` que devolvió deposit_data({ ordenId, una_sola_firma: true }), TAL CUAL. Bernuvia lo verifica y deriva de él el nonce. Sirve para la cotización VIGENTE de esa orden; si ya pediste otra cotización, usa `nonce`."New value: +"Optional (requires `ordenId`): the `cotizacion` object returned by deposit_data({ ordenId, una_sola_firma: true }), AS IS. Bernuvia verifies it and derives the nonce from it. It works for the CURRENT quote of that order; if you already requested another quote, use `nonce`."
    • changedInput schema / properties / retransmitir / description
      Previous value: -"ALIAS RETIRADO de `broadcast`: sigue funcionando, pero usa `broadcast` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `broadcast`. Opcional, con firma. true = Bernuvia envía la cancelación pagando el gas (si el gas patrocinado está disponible); si no, devuelve el calldata para que la envíes tú."New value: +"DEPRECATED alias of `broadcast`: it still works, but use `broadcast` (it will be removed in a future round, no date yet). Optional, together with firma. true = Bernuvia sends the cancellation and pays the gas (if sponsored gas is available); otherwise it returns the calldata so that you send it yourself."
    • changedInput schema / properties / signature / description
      Previous value: -"Opcional. Tu firma EIP-712 del typedData CancelAuthorization que devuelve esta misma función sin firma (0x + 130 hex)."New value: +"Optional. Your EIP-712 signature of the CancelAuthorization typedData that this same function returns when called without a signature (0x + 130 hex)."
    • changedOutput schema / properties / dominioOrigen / description
      Previous value: -"Solo con \"firma_requerida\": de dónde salió el dominio EIP-712, \"cadena\" (leído del token) o \"asumido\"."New value: +"Only with \"firma_requerida\": where the EIP-712 domain came from, \"cadena\" (read from the token) or \"asumido\"."
    • changedOutput schema / properties / esDeLaCotizacionVigente / description
      Previous value: -"Solo cuando se derivó de una `cotizacion`: el nonce es el de la cotización vigente de esa orden. Ausente si lo diste tú suelto (no se puede afirmar)."New value: +"Only when it was derived from a `cotizacion`: the nonce is the one of the current quote of that order. Absent if you gave it on its own (it cannot be asserted)."
    • changedOutput schema / properties / estado / description
      Previous value: -"La rama de la respuesta: ya_no_vale, firma_requerida, lista_para_enviar, cancelacion_enviada o cancelada."New value: +"The branch of the response: ya_no_vale, firma_requerida, lista_para_enviar, cancelacion_enviada or cancelada."
    • changedOutput schema / properties / gasPatrocinado / description
      Previous value: -"Solo cuando envió Bernuvia: true, el gas lo pagó ella."New value: +"Only when Bernuvia sent it: true, the gas was paid by Bernuvia."
    • changedOutput schema / properties / nonce / description
      Previous value: -"El bytes32 de la autorización a la que se refiere esta respuesta."New value: +"The bytes32 of the authorization this response refers to."
    • changedOutput schema / properties / ordenCerrada / description
      Previous value: -"Solo con \"cancelada\" y habiendo nombrado una orden: si además quedó cerrada (no se cierra mientras su cotización pueda canjearse)."New value: +"Only with \"cancelada\" and having named an order: whether the order was also closed (it is not closed while its quote can still be redeemed)."
    • changedOutput schema / properties / ordenId / description
      Previous value: -"El uuid de la orden, solo si la nombraste en la llamada (retirando por `nonce` suelto puede no haberla)."New value: +"The uuid of the order, only if you named it in the call (when withdrawing by a bare `nonce` there may be none)."
    • changedOutput schema / properties / retransmisionDisponible / description
      Previous value: -"¿Puede Bernuvia enviar la cancelación pagando el gas? Ausente en las ramas donde ya no procede."New value: +"Can Bernuvia send the cancellation and pay the gas? Absent in the branches where it no longer applies."
    • changedOutput schema / properties / siguientePaso / description
      Previous value: -"Qué hacer ahora, en una frase."New value: +"What to do now, in one sentence."
    • changedOutput schema / properties / transaccion / description
      Previous value: -"Solo con estado \"lista_para_enviar\": el sobre listo para enviar desde cualquier wallet (lo que cuenta es la firma)."New value: +"Only with estado \"lista_para_enviar\": the envelope ready to be sent from any wallet (what counts is the signature)."
    • changedOutput schema / properties / transaccion / properties / data / description
      Previous value: -"Calldata de cancelAuthorization ya codificado (0x…)."New value: +"Already encoded calldata of cancelAuthorization (0x…)."
    • changedOutput schema / properties / transaccion / properties / descripcion / description
      Previous value: -"Qué hace la transacción."New value: +"What the transaction does."
    • changedOutput schema / properties / transaccion / properties / to / description
      Previous value: -"Dirección del contrato USDC."New value: +"Address of the USDC contract."
    • changedOutput schema / properties / transaccion / properties / value / description
      Previous value: -"POL nativo a enviar, en HEXADECIMAL con 0x (QUANTITY del JSON-RPC): siempre \"0x0\"."New value: +"Native POL to send, in HEXADECIMAL with 0x (JSON-RPC QUANTITY): always \"0x0\"."
    • changedOutput schema / properties / txHash / description
      Previous value: -"Solo con \"cancelacion_enviada\" o \"cancelada\": hash de la transacción que envió Bernuvia."New value: +"Only with \"cancelacion_enviada\" or \"cancelada\": hash of the transaction Bernuvia sent."
    • changedOutput schema / properties / typedData / description
      Previous value: -"Solo con estado \"firma_requerida\": el mensaje EIP-712 CancelAuthorization a firmar con signTypedData."New value: +"Only with estado \"firma_requerida\": the EIP-712 CancelAuthorization message to sign with signTypedData."
    • changedOutput schema / properties / typedData / properties / domain / description
      Previous value: -"Dominio EIP-712 del USDC (name, version, chainId, verifyingContract)."New value: +"EIP-712 domain of the USDC (name, version, chainId, verifyingContract)."
    • changedOutput schema / properties / typedData / properties / message / description
      Previous value: -"Los valores firmados."New value: +"The signed values."
    • changedOutput schema / properties / typedData / properties / message / properties / authorizer / description
      Previous value: -"Tu wallet pagadora: la única que puede cancelar sus autorizaciones."New value: +"Your paying wallet: the only one that can cancel its own authorizations."
    • changedOutput schema / properties / typedData / properties / message / properties / nonce / description
      Previous value: -"El mismo bytes32 de la autorización."New value: +"The same bytes32 of the authorization."
    • changedOutput schema / properties / typedData / properties / primaryType / description
      Previous value: -"Siempre \"CancelAuthorization\"."New value: +"Always \"CancelAuthorization\"."
    • changedOutput schema / properties / typedData / properties / types / description
      Previous value: -"Definición de tipos EIP-712."New value: +"EIP-712 type definitions."
  2. 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 provided, the description fully carries behavioral disclosure. It reveals conditional returns (typedData without signature, calldata with signature, broadcast variant), that the server controls the authorizer, that the order only closes under a specific condition, and that already-used/cancelled authorizations are detected and reported.

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?

It is a single dense paragraph, but every clause earns its place by explaining a distinct behavioral branch, security consideration, or edge case. The core purpose is front-loaded, and the length is justified by the genuine complexity of the operation.

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?

For a 9-parameter tool with no annotations and multiple operational modes, the description covers the full decision space: identification routes, signature modes, broadcast behavior, order closure semantics, and already-used/cancelled outcomes. An agent has enough context to select parameters and interpret 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 coverage is 100%, so the baseline is 3, but the description adds meaningful usage semantics beyond the schema: where `nonce` comes from, why `nonce` is preferred over `cotizacion`, and how `signature` alters the return behavior. It does not redundantly re-explain every field, but it does not need to given the complete 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?

The description opens with a specific verb and resource: 'Withdraws a gasless-deposit authorization'. It clearly distinguishes this from related deposit operations by framing it as revocation of an already-issued authorization, not creation or submission.

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 explicitly explains when to use the `nonce` route versus the `orderId` + `cotizacion` route, including the caveat that `nonce` works even after a newer quote is requested. It also covers the choice between returning calldata for self-submission and using `broadcast`/`retransmitir` for Bernuvia to send it.

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