Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_deactivate_compliance_system

DestructiveIdempotent

Deactivates a company's compliance system from a specified date without activating another, preventing invoices on or after that date from being reported through it.

Instructions

Stops system from applying to this company from effective_to on, in the environment of the request, without activating another one in its place. Invoices issued on or after that date are not reported through it. To move to a system that excludes this one, activate that one instead: the switch happens in a single call.

  • Today or later: without effective_to (send {}), the system stops applying today. A date in the past answers 422 COMPLIANCE_EFFECTIVE_DATE_IN_PAST.

  • Scheduled activations: one that would start on or after effective_to is cancelled, which is always accepted; one that is in force, or starts before, ends on effective_to, and for the SII that is leaving it.

  • Nothing to deactivate: when the system does not apply on or after effective_to, the request answers 200 and changes nothing.

  • No system left: deactivating the only system that applies is accepted, in Live and in Sandbox alike. From effective_to on, the company's invoices are not reported through any system until one is activated again.

  • VeriFactu: deactivating VERIFACTU behaves like turning VeriFactu off with PUT /v1/companies/{company_id}/verifactu-configuration, with the same effects.

  • SII in Live: leaving it takes effect tomorrow at the earliest, never on a past date. It can only be left from 1 January when settings.reason is VOLUNTARY or MANDATORY_LARGE_COMPANY, from the first day of a month when it is REDEME, and on any date when it is VAT_GROUP, judged by the reason of the period in force. This also applies to an SII activation that is scheduled and would end after it starts.

  • SII in Sandbox: it can be left on any date from today.

  • Cancelling a scheduled SII: the VeriFactu period that ended on its effective_from is left without an end date.

The response carries the same body as GET /v1/companies/{company_id}/compliance.

BeeL API endpoint: POST /v1/companies/{company_id}/compliance/systems/{system}/deactivate (reference: https://docs.beel.es)

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>",
      "system": "<system>",
      "body": "<body>"
    },
    "name": "beel_deactivate_compliance_system"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYes
systemYesThe compliance system the operation acts on. A value that is not listed answers `400 VALIDATION_ERROR`.
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.
idempotency_keyNoOptional idempotency key for this operation. Omit it and one is derived from the request itself, which makes a blind retry safe but also collapses a SECOND, deliberately identical operation into the first for 24 hours. Set it — to an order id, or anything unique per intended operation — whenever you mean to create something that may look identical to what you just created.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.12.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds the consequences the annotations cannot: invoices from that date are unreported, leaving the only system is accepted and leaves the company with no reporting system, scheduled activations get cancelled, and SII departure has date/`reason`-dependent rules. Error semantics (422, 200 no-op) are also disclosed.

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?

The core action is stated in the first sentence and edge cases are bulleted under labeled headings, so it is easy to scan despite its length. It is verbose in places (VeriFactu, SII Live, and SII cancellation each get a bullet) but the complexity of the operation justifies most of it.

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, environment-sensitive mutation with four parameters and no output schema, the description covers consequences, error codes, environment differences, and the sibling escape hatch for switching systems. It also tells the agent what the response body is by pointing at `GET /v1/companies/{company_id}/compliance`, closing the missing-output-schema gap.

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 75%, and the description still adds real meaning for `effective_to` — default of today, exclusion of past dates, and how its value interacts with in-force vs scheduled activations and the SII leaving period. It does not add much beyond the schema for `system`, `company_id`, or `idempotency_key`, so it is not a full 5.

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?

Opens with a precise verb and scope: stops `system` from applying from `effective_to` on, in the request's environment, and explicitly without activating a replacement. It also names and routes to the sibling action (`beel_activate_compliance_system`) for the swap case, so the agent can distinguish the two without opening the 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?

Enumerates exactly when this tool applies and what happens at each boundary: send `{}` to stop today, past dates reject with 422, scheduled activations before/after `effective_to` are handled differently, a no-op returns 200. It also gives the preferred alternative for VeriFactu (the configuration endpoint) and environment-specific SII restrictions (Live vs Sandbox).

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