Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_delete_series

DestructiveIdempotent

Soft-deletes an invoice series, deactivating it first if active and keeping its code reserved for invoices already issued.

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.

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

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

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>",
      "series_id": "<series_id>"
    },
    "name": "beel_delete_series"
  }
}

Input 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. Changed1 schema field changedv0.10.0
    • addedInput schema / properties / series_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.4/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the code is not released and recreating it yields 409 SERIES_CODE_DUPLICATED, that the delete cascades from deactivation, and the two distinct end states for a default series. These are non-obvious consequences an agent could not infer from destructiveHint/idempotentHint alone.

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-loads the core action, then uses bolded labels for the two edge cases, keeping each point scannable and non-redundant. The endpoint and read-before-calling block are useful rather than filler, though the guardrail pointers make the definition slightly longer than strictly necessary.

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 definition covers the soft-delete semantics, the error codes an agent will encounter, and the prerequisite ordering for default series. Nothing material needed to invoke it safely 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 both parameters already carry detailed descriptions, including the company_id scoping and 403 behavior. The description adds only an indirect reference to series_id in the context of SERIES_DEFAULT_NOT_FOUND, so the schema continues to do 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?

States a specific verb and resource ('Soft-deletes an invoice series') plus the state transition it performs ('deactivating it first if it is active'). This is clearly distinguishable from siblings like beel_patch_series or beel_set_default_series without opening any schema.

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?

Gives explicit preconditions for the tricky case: a default series cannot be deleted while another active series of the same document type exists, and must be 'promote[d] ... first'. It also points to beel_rules_list and the beel://guardrails resources before calling. It stops short of naming the concrete sibling tool to use for promotion (beel_set_default_series), so the routing is implied rather than spelled out.

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