Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_delete_invoice

DestructiveIdempotent

Deletes a draft invoice, marks it as deleted, and restores any linked proforma to ACTIVE for editing and conversion.

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.

BeeL API endpoint: DELETE /v1/companies/{company_id}/invoices/{invoice_id} (reference: https://docs.beel.es)

⚠️ 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)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "company_id": "<company_id>",
      "invoice_id": "<invoice_id>"
    },
    "name": "beel_delete_invoice"
  }
}

Input 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. Changed1 schema field changedv0.10.0
    • addedInput schema / properties / invoice_id / type
      Added value: +"string"
  2. 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."
  3. First observedv0.3.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered; the description goes further by disclosing the soft-delete semantics and the fiscal-trail rationale, plus the non-obvious side effect on the source proforma's state. It does not describe the response body or any permission/error behavior beyond what the schema's company_id note already covers.

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 a clearly marked 'Read before calling' block. The guardrails/resource pointers are useful but slightly tangential for a tool an agent already knows it needs; wording is otherwise tight 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 two-parameter destructive mutation with no output schema, the description covers scope, alternatives, side effects on related records, and where to check fiscal rules. Nothing an agent needs to call it correctly or safely 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 100%, so baseline is 3, but the description adds real constraint meaning for invoice_id: only draft invoices are accepted, and the proforma-linked case is called out. It does not add anything for company_id, which the schema already explains in detail.

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') plus the crucial scope restriction (draft only), and immediately clarifies that the record is soft-deleted rather than removed. An agent can distinguish it from beel_void_invoice 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 says issued invoices are never deleted and names the alternative endpoint/tool path (`POST …/{invoice_id}/void`) for them. It also documents the re-usable proforma case where deletion, not voiding, returns the proforma from CONVERTED to ACTIVE.

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