Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_update_verifactu_configuration

Idempotent

Replaces a company's VeriFactu configuration by setting enabled: turning it on registers the tax ID for AEAT submission atomically; turning it off deregisters it.

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 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.

  • Sandbox is always on: enabled: false there answers 422 VERIFACTU_ALWAYS_ON_IN_SANDBOX.

Turning it off

Setting enabled to false stops sending this company's invoices to AEAT and starts deregistering the NIF from VeriFactu submission. 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.

Endpoint: PUT /v1/companies/{company_id}/verifactu-configuration

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

Input Schema

TableJSON 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. 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"
      +]
  2. 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."
  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?

Goes well past the annotations: discloses atomic all-or-nothing registration, concrete error codes (422 VERIFACTU_REPRESENTATION_REQUIRED, VERIFACTU_ALWAYS_ON_IN_SANDBOX), and the crucial fact that disabling does NOT deactivate the company or release the NIF (pointing to DELETE activations instead). It does not, however, describe the response payload shape for the success case, which would be helpful given there is no output schema.

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 and uses bold headers and bullets for scannability, with a dedicated 'Turning it off' section. It is somewhat long and repeats the atomic-registration and sandbox facts already present in the schema's `enabled` description, costing a point on efficiency.

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 mutation with no output schema, the description covers the write semantics, atomicity, environment-specific failure modes, the meaning of both on and off, and where to find prerequisite guardrail docs. An agent has everything needed to call it correctly without opening other tools.

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 50%, so the description must compensate for the documented-but-verbose schema. It clarifies that `enabled` is the only writable field, is required, and that this is a full replacement rather than a partial merge, plus server-side resolution of the remaining configuration. It adds real meaning beyond the schema's field-level text.

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 specific verb+resource: 'Replaces the VeriFactu configuration of a company.' It also names the exact endpoint (PUT /v1/companies/{company_id}/verifactu-configuration), making the write scope unambiguous and clearly distinguishable from the read sibling beel_get_verifactu_configuration.

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?

States precisely when the tool applies (turning VeriFactu on/off for a tax ID), the precondition for Live (signed and validated AEAT representation), the sandbox exception (always on, cannot be turned off), and routes the agent to beel_rules_list and the beel://guardrails resources for prerequisite context. Explicit when-not conditions are included.

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