Skip to main content
Glama

Cancel/annul invoice (irreversible)

cancel_invoice
Destructive

Annul (anular) a finalized invoice, sends a RegistroAnulacion to the AEAT (if the invoice was never sent to the AEAT, the anulación is recorded only in the local hash chain). IRREVERSIBLE Veri*factu chain event: the invoice then counts as never issued. Ask the user for explicit confirmation, then call with confirm=true. For a later discount or correction use rectify_invoice instead (anulación is 'this was a mistake'). Returns a confirmation that the annulment was recorded.

Input Schema

NameRequiredDescriptionDefault
reasonYesinternal reason (duplicate, wrong recipient, input error…)
confirmYesMust be true. Only after the user explicitly confirmed the irreversible annulment.
invoice_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only flag destructiveHint/readOnlyHint; the description goes well beyond by explaining what actually happens downstream (RegistroAnulacion sent to AEAT, or recorded only in the local hash chain if never submitted) and the irreversible semantic effect that the invoice counts as never issued. It also discloses the return value and the mandatory confirmation gate.

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?

Two front-loaded sentences plus a routing clause carry the irreversibility warning, the AEAT/local-chain branch, the confirmation protocol, the sibling alternative, and the return value with 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?

For a destructive, irreversible tool with no output schema, the description covers consequences, the AEAT branch, the confirmation prerequisite, the alternative tool, and what is returned. Nothing an agent needs before invoking it is missing.

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 67%, with confirm and reason already documented; the description still adds the procedural meaning of confirm (only after explicit user confirmation) and frames reason as the 'this was a mistake' rationale. invoice_id remains undocumented in both places, which is the only real gap.

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?

"Annul (anular) a finalized invoice" gives a precise verb plus resource and adds the governing model (Veri*factu chain, invoice counts as never issued). It is unmistakably distinct from siblings like delete_invoice and rectify_invoice, which the description names explicitly.

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?

States the selection rule between this and rectify_invoice (anulación = 'this was a mistake'; rectify = later discount or correction), plus the prerequisite workflow of obtaining explicit user confirmation before calling with confirm=true. Both the when and the when-not are spelled out.

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