Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_update_verifactu_configuration

DestructiveIdempotent

Enable or disable VeriFactu for a company by replacing its configuration; turning it on registers the tax ID for AEAT submission atomically, while turning it off stops new invoice submissions.

Instructions

Replaces the VeriFactu configuration of a company.

  • Writable fields: only enabled, and it is required — this is a full replacement, not a partial merge. The rest of the returned configuration is resolved server-side.

  • Turning it on is activating VeriFactu today: enabled: true follows the rules of POST /v1/companies/{company_id}/compliance/systems/VERIFACTU/activate with effective_from today, in the same order and with the same error codes, except in Sandbox: there it never ends another compliance system, and with another system in force or scheduled it answers 422 COMPLIANCE_SYSTEMS_INCOMPATIBLE. It registers the NIF for VeriFactu submission in the same call, atomically: if the registration is refused nothing is persisted and the response carries the reason. In Live it requires a signed and validated AEAT representation first, or 422 VERIFACTU_REPRESENTATION_REQUIRED. When VeriFactu already applies, it answers 200 and changes nothing.

  • Turning it off is deactivating VeriFactu today: enabled: false follows the rules of POST /v1/companies/{company_id}/compliance/systems/VERIFACTU/deactivate, in Live and in Sandbox alike. A company in Sandbox can be left without any compliance system.

  • Moving from another system: this resource does not end another compliance system. When VeriFactu does not apply and another system applies or is scheduled, enabled: true answers 422; move with POST /v1/companies/{company_id}/compliance/systems/VERIFACTU/activate and an effective_from the other system can be left on.

Turning it off

Setting enabled to false stops sending this company's new invoices to the AEAT. The NIF stays registered for VeriFactu submission, so invoices already sent can still be voided or corrected through it. It does not deactivate the company: the activation is a fact of its own for the (company, environment) pair, so the company keeps issuing in that environment and stays ready. Releasing the NIF — and in Live freeing it for another account — is always DELETE /v1/companies/{company_id}/activations.

BeeL API endpoint: PUT /v1/companies/{company_id}/verifactu-configuration (reference: https://docs.beel.es)

⚠️ Read before calling:

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

  • How to tell, before issuing, whether a NIF can issue, and what each blocker means. (resource: beel://guardrails/verifactu-gates)

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

Input Schema

NameRequiredDescriptionDefault
bodyYes
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.12.0
    • changedInput schema / $defs / UpdateVeriFactuConfigurationRequest / properties / enabled / description
      Previous value: -"Whether this tax ID is under the VeriFactu regime in the environment of the request.\n\nIt is a fact about the **taxpayer**, not about a document: while it is on, *every*\ninvoice of this tax ID is registered with the AEAT; while it is off, none is. There\nis no per-invoice choice.\n\nTurning it on **registers the tax ID for VeriFactu submission in the same call**,\natomically: if the registration is refused, nothing is persisted and the response\ncarries the reason.\nIn Live it requires a signed and validated AEAT representation first\n(`VERIFACTU_REPRESENTATION_REQUIRED`).\n\nIn **sandbox VeriFactu is always on and cannot be turned off**\n(`VERIFACTU_ALWAYS_ON_IN_SANDBOX`): nothing there reaches the real AEAT.\n"New value: +"Whether this tax ID is under the VeriFactu regime in the environment of the request.\n\nIt is a fact about the **taxpayer**, not about a document: while it is on, *every*\ninvoice of this tax ID is registered with the AEAT; while it is off, none is. There\nis no per-invoice choice.\n\nTurning it on **registers the tax ID for VeriFactu submission in the same call**,\natomically: if the registration is refused, nothing is persisted and the response\ncarries the reason.\nIn Live it requires a signed and validated AEAT representation first\n(`VERIFACTU_REPRESENTATION_REQUIRED`).\n\nIn **sandbox** it is turned on and off exactly as in Live, and the company can be left\nwithout any compliance system. Nothing there reaches a real tax authority. Turning it\noff does not deregister the tax ID.\n"
  2. Changed1 schema field changedv0.10.0
    • addedInput schema / properties / body / type
      Added value: +"object"
  3. Changed4 schema fields changedv0.9.0
    • changedInput schema / $defs / UpdateVeriFactuConfigurationRequest / description
      Previous value: -"Request body of `PUT /v1/configuration/verifactu`. Carries the **only two writable\nfields**; everything else in `VeriFactuConfiguration` is resolved server-side.\n\nBoth are required and there is **no default**: this PUT replaces the whole state, so\nomitting a field is a client error, not a silent `false`. A `default:` here would be\nmaterialized in the generated DTO and would satisfy the `@NotNull` before validation\ncould tell \"not sent\" from \"sent as false\" — which is how `{\"apply_by_default\": true}`\nused to turn VeriFactu off and answer 200 (BEE-868).\n"New value: +"Request body of `PUT /v1/configuration/verifactu`. Carries the **only writable field**;\neverything else in `VeriFactuConfiguration` is resolved server-side.\n\n`enabled` is required and has **no default**: this PUT replaces the whole state, so\nomitting it is a client error, not a silent `false`. A `default:` here would be\nmaterialized in the generated DTO and would satisfy the `@NotNull` before validation\ncould tell \"not sent\" from \"sent as false\".\n"
    • removedInput schema / $defs / UpdateVeriFactuConfigurationRequest / properties / apply_by_default
      Removed value: -{
      -  "description": "Whether VeriFactu should be automatically applied to new invoices.\nRequires 'enabled' to be true.\n",
      -  "type": "boolean"
      -}
    • changedInput schema / $defs / UpdateVeriFactuConfigurationRequest / properties / enabled / description
      Previous value: -"Whether VeriFactu is enabled for this user.\nWhen enabled, the user can submit invoices to AEAT.\nFreelancers who don't need to submit invoices to AEAT can leave it disabled.\n"New value: +"Whether this tax ID is under the VeriFactu regime in the environment of the request.\n\nIt is a fact about the **taxpayer**, not about a document: while it is on, *every*\ninvoice of this tax ID is registered with the AEAT; while it is off, none is. There\nis no per-invoice choice.\n\nTurning it on **registers the tax ID for VeriFactu submission in the same call**,\natomically: if the registration is refused, nothing is persisted and the response\ncarries the reason.\nIn Live it requires a signed and validated AEAT representation first\n(`VERIFACTU_REPRESENTATION_REQUIRED`).\n\nIn **sandbox VeriFactu is always on and cannot be turned off**\n(`VERIFACTU_ALWAYS_ON_IN_SANDBOX`): nothing there reaches the real AEAT.\n"
    • changedInput schema / $defs / UpdateVeriFactuConfigurationRequest / required
      Previous value: -[
      -  "enabled",
      -  "apply_by_default"
      -]New value: +[
      +  "enabled"
      +]
  4. Changed3 schema fields changedv0.5.0
    • addedInput schema / $defs / UpdateVeriFactuConfigurationRequest / additionalProperties
      Added value: +false
    • 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."
  5. First observedv0.3.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only flag destructive/idempotent/non-readonly; the description adds far more — atomic NIF registration with rollback on refusal, Live prerequisite of a signed AEAT representation (`422 VERIFACTU_REPRESENTATION_REQUIRED`), Sandbox divergence (`422 COMPLIANCE_SYSTEMS_INCOMPATIBLE`, company may be left without a system), and the exact error codes. It clarifies what is NOT destroyed when disabling (NIF stays registered, company stays `ready`, already-sent invoices can still be voided/corrected).

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?

Well front-loaded with a one-line summary, bolded bullet headers, and a separate 'Turning it off' section that adds genuinely new detail (NIF retention, void/correct path, DELETE /activations). It is long and repeats the deactivate rules twice, and the endpoint line plus 'Read before calling' block add bulk, but almost every sentence carries an operational fact.

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, atomic, environment-dependent mutation with no output schema, the description covers prerequisites, error codes, sandbox/live divergence, idempotent replay behavior, and side effects on the (company, environment) pair. An agent has everything needed to call it correctly or to route elsewhere; return shape is adequately implied by 'the rest of the configuration is resolved server-side'.

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?

Adds meaning beyond the schema by declaring `enabled` is the only writable field, is required with no default, and that this is a full replacement rather than a merge — plus the behavioral consequence of true vs false (today's activation/deactivation). Much of this is echoed in the nested schema description, so the incremental value is real but partly duplicative; `company_id` semantics are left entirely to the schema.

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 ('Replaces the VeriFactu configuration of a company') and immediately scopes the blast radius ('only writable field is `enabled`, full replacement, not partial merge'). It also explicitly separates itself from the sibling compliance endpoints (`.../VERIFACTU/activate`, `.../deactivate`, `DELETE /activations`), so an agent can tell which tool applies without opening another 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?

Gives explicit when/when-not routing: use this to turn VeriFactu on/off today; do NOT use it to move off another compliance system — use POST .../VERIFACTU/activate with `effective_from` instead; use DELETE .../activations to release the NIF. It also spells out the no-op case ('when VeriFactu already applies, it answers 200 and changes nothing').

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