Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_delete_invoice

DestructiveIdempotent

Deletes a draft invoice by marking it deleted, never removing issued invoices. Restores a converted proforma to active when its draft invoice is deleted.

Instructions

Deletes a draft invoice of this company. The record is marked as deleted rather than removed.

  • Issued invoices: never deleted. They are voided with POST …/{invoice_id}/void, which leaves the fiscal trail.

  • source_proforma_id: when the draft came from converting a proforma, deleting it returns that proforma from CONVERTED to ACTIVE, editable and convertible again. Voiding or rectifying an issued invoice does not return its proforma; only deleting the draft does.

Endpoint: DELETE /v1/companies/{company_id}/invoices/{invoice_id}

⚠️ Read before calling:

  • Fiscal rules, domains lifecycle: beel_rules_list with domain, or resource beel://guardrails/.

  • The status names, the proforma lifecycle, and which tool performs each operation. (resource: beel://guardrails/invoice-state-machine)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.5.0
    • removedInput schema / $defs / UUID / example
      Removed value: -"550e8400-e29b-41d4-a716-446655440000"
    • 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.6/5.0
Behavior5/5

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

Annotations already flag destructive/idempotent, but the description adds the crucial fact that the record is soft-deleted ('marked as deleted rather than removed') and preserves the fiscal trail, plus a non-obvious side effect: deleting a proforma-derived draft returns the proforma from CONVERTED to ACTIVE. That is behavioral context the annotations cannot convey.

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?

Front-loaded with the core action, then bulleted distinctions and the endpoint, then a short pre-call warning with resource pointers. It is longer than average, but each block (void-vs-delete, proforma lifecycle, guardrails reference) carries distinct information; minor trimming is possible.

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 2-parameter mutation with no output schema, the description covers the action, its reversibility model, the divergent sibling behavior, and where to find fiscal rules. Nothing an agent needs to call this correctly is missing.

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

Parameters3/5

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

Schema coverage is 100% and the schema itself carries a rich company_id description (UUID, 403 behavior, header semantics), so the schema already does the work. The description adds no parameter-level syntax or format information beyond it, so the baseline 3 applies.

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?

States a specific verb and resource ('Deletes a draft invoice of this company') and immediately scopes it to drafts, distinguishing it from sibling beel_void_invoice. An agent can tell it apart from the void/rectify tools without opening either schema.

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?

Explicitly names when not to use it (issued invoices are never deleted, they are voided via POST .../{invoice_id}/void) and the case that selects it (drafts, including proforma-converted drafts). It also points the agent to beel_rules_list / guardrail resources for preconditions.

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