Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_void_invoice

DestructiveIdempotent

Void an issued invoice only if the operation never took place; the document and invoice number are kept. Requires a reason (min 10 chars) and sends a VeriFactu cancellation to AEAT when enabled.

Instructions

Voids an issued invoice of this company. The document is kept and its number is never reused.

  • When to use it: the operation never took place. If it did take place but with errors, issue a corrective invoice instead (POST …/{invoice_id}/corrective).

  • reason: required, at least 10 characters — it is fiscal data.

  • VeriFactu: when it is enabled for the invoice, a cancellation record is submitted to the AEAT.

  • Proformas: voiding an ACTIVE proforma is a plain status change with no fiscal effect — no corrective invoice, nothing submitted to the AEAT. The voided proforma is kept as the record of a rejected or withdrawn offer and stays listed.

Endpoint: POST /v1/companies/{company_id}/invoices/{invoice_id}/void

⚠️ Fiscal guardrails — read before calling:

  • Choosing wrong here misreports to AEAT. The 30-second decision. (resource: beel://guardrails/cancel-vs-rectify)

  • When an invoice can still be changed, and what to do once it cannot. (resource: beel://guardrails/invoice-state-machine)

For the exhaustive rules and worked examples, call beel_docs_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
company_idYesUnique identifier (UUID) of the company the operation acts on — its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist, so the existence of a company in another account is never disclosed.
invoice_idYesInvoice ID
idempotency_keyNoOptional idempotency key for this operation. Omit it and one is derived from the request itself, which makes a blind retry safe but also collapses a SECOND, deliberately identical operation into the first for 24 hours. Set it — to an order id, or anything unique per intended operation — whenever you mean to create something that may look identical to what you just created.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.5.0
    • removedInput schema / $defs / UUID / example
      Removed value: -"550e8400-e29b-41d4-a716-446655440000"
    • addedInput schema / $defs / VoidInvoiceRequest / additionalProperties
      Added value: +false
    • removedInput schema / $defs / VoidInvoiceRequest / properties / reason / example
      Removed value: -"Invoice issued with incorrect customer data"
    • removedInput schema / $defs / VoidInvoiceRequest / properties / void_date / example
      Removed value: -"2025-01-20"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / company_id / description
      Previous value: -"NIF (company) the operation acts on. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A NIF you do not reach answers `403`, and so does a NIF that does not exist, so the existence of a NIF in another account is never disclosed."New value: +"Unique identifier (UUID) of the company the operation acts on — its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist, so the existence of a company in another account is never disclosed."
  2. First observedv0.3.1

TDQS

A4.9/5.0
Behavior5/5

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

Discloses behaviors beyond the annotations: the document is kept, the number is never reused, VeriFactu submits a cancellation record to AEAT, and voiding an ACTIVE proforma is a purely non-fiscal status change. This complements the destructiveHint/readOnlyHint annotations without contradicting them.

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?

Dense but well-structured: core semantics first, then when-to-use, parameter note, fiscal edge case, endpoint, and guardrail pointers. Every bullet earns its place, and the high-stakes fiscal warning is clearly highlighted.

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?

Covers the operation's effects, the decision point between voiding and correcting, fiscal-reporting consequences, and the proforma exception. It also directs the agent to beel_docs_search for exhaustive rules. Since there is no output schema, this behavioral context is what an agent most needs.

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?

With 75% schema coverage, the schema already documents reason, void_date, company_id, and idempotency_key in detail. The description adds context for reason ('required, at least 10 characters — it is fiscal data') and gives invoice_id meaningful behavior when the target is a proforma.

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?

Opens with a specific verb and resource: 'Voids an issued invoice of this company' and immediately adds permanent consequences ('The document is kept and its number is never reused'). The note about corrective invoices distinguishes it from beel_create_corrective_invoice, so an agent can classify the operation correctly.

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?

Provides an explicit 'When to use it' criterion: the operation never took place; if it did but with errors, use a corrective invoice instead. It also handles the proforma exception and points to fiscal guardrail resources, which is strong guidance for choosing between this and alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools