Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_delete_series

DestructiveIdempotent

Soft-deletes an invoice series, deactivating it first if active. The code stays reserved for issued invoices, and a default series requires promoting another active series before removal.

Instructions

Soft-deletes an invoice series, deactivating it first if it is active.

  • The code is not released: it stays taken after the deletion because it identifies the invoices already issued under it, so recreating a series with the same code answers 409 SERIES_CODE_DUPLICATED.

  • Default series: it cannot be deleted while another active series of the same document type exists — promote that other one first. If it is the only series of its type it is deleted and the type is left with none, a valid state in which issuing without an explicit series_id answers SERIES_DEFAULT_NOT_FOUND.

Endpoint: DELETE /v1/companies/{company_id}/series/{series_id}

⚠️ Read before calling:

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

  • How a series formats numbers, and which series configurations are rejected. (resource: beel://guardrails/series-and-numbering)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
series_idYesSeries ID
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.

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.5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is clear. The description adds substantial behavior beyond annotations: soft-delete semantics, automatic deactivation, the fact that the code remains reserved (with the specific 409 SERIES_CODE_DUPLICATED consequence), default-series constraints, and the final SERIES_DEFAULT_NOT_FOUND error state when no series remains.

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?

The description is front-loaded with the core operation, then uses bullets to separate the two critical edge cases (code retention and default-series handling). Every sentence earns its place: the bullets describe non-obvious constraints and error responses, and the 'Read before calling' section points to relevant resources without bloating the main text.

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 mutation with full annotation coverage and no output schema, the description is complete: it states the operation, soft-delete behavior, ordering constraint (deactivate first), post-deletion consequences, error conditions, and relevant reference resources. No essential agent-facing detail 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 description coverage is 100%, and the schema itself already documents company_id in detail and series_id minimally. The description adds no new meaning for the two parameters beyond what the endpoint path already implies. Per the rubric, a 3 is the baseline when the schema does the heavy lifting.

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 first sentence gives a specific verb (soft-deletes), the resource (invoice series), and a key behavioral qualifier (deactivating it first if active). This distinguishes the operation from a hard delete and from sibling tools like patch_series or set_default_series. The endpoint reinforces the resource and path semantics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear constraints and prerequisites for deletion, including the default-series rule and the consequence of deleting the last series. It implies that another series must be promoted first, but it does not name an explicit alternative tool (e.g., set_default_series) or state when to prefer deactivation over deletion. The 'Read before calling' pointers add useful context but are not selection guidance.

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