Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_delete_invoice

DestructiveIdempotent

Delete a draft invoice to mark it as removed; if it originated from a proforma, restore that proforma to ACTIVE. Issued invoices are voided instead, preserving fiscal records.

Instructions

Deletes a draft invoice of this company. The record is marked as deleted rather than removed. An issued invoice is never deleted: it is voided with POST …/{invoice_id}/void, which leaves the fiscal trail.

If the draft came from converting a proforma (source_proforma_id present), 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}

⚠️ Fiscal guardrails — read before calling:

  • 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
company_idYesNIF (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.
invoice_idYesInvoice ID
Behavior5/5

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

The annotations already indicate destructiveHint=true and readOnlyHint=false, so the description correctly aligns with them and adds significant behavioral context: the soft-delete nature, the proforma status transition, and the explicit guardrail that issued invoices are never deleted. It discloses side effects and points to a dedicated resource for fiscal rules, going well beyond what annotations provide.

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?

Every sentence earns its place: the core action, the soft-delete detail, the issued-invoice alternative, the proforma side effect, and the pointer to guardrails. It is front-loaded with the essential purpose and then layers necessary constraints. No filler or redundancy.

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 tool with no output schema, the description covers all critical operational aspects: the conditions under which deletion applies, what happens to proformas, the guardrails, and where to get exhaustive rules. An agent knows exactly what to expect and how to proceed. Nothing essential 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?

The schema covers both parameters with 100% coverage, including a detailed description of company_id (explaining NIF, context derivation, and 403 behavior). The tool description adds no additional parameter-specific meaning, which is acceptable given the schema quality. The baseline 3 applies because the schema carries the semantic burden, and the description does not need to repeat it.

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 clearly states a specific action: 'Deletes a draft invoice of this company' and immediately clarifies it is a soft delete ('marked as deleted rather than removed'). It explicitly distinguishes this from voiding issued invoices, differentiating it from siblings like beel_void_invoice. The scope (draft only) is unambiguous.

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 provides explicit when-to-use guidance: only for draft invoices. It gives an exclusion condition (issued invoices) and points to the alternative (void endpoint) with a concrete API path. It also explains the proforma-reversion behavior and directs to guardrails and docs for exhaustive rules. This fully informs an agent when to pick this tool over others.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/beel-es/beel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server