Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_update_verifactu_configuration

DestructiveIdempotent

Replaces a company's VeriFactu configuration: enable it to register the NIF for AEAT submission atomically, or disable it to stop submission and deregister the NIF.

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.

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.10.0
    • addedInput schema / properties / body / type
      Added value: +"object"
  2. 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"
      +]
  3. 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."
  4. First observedv0.3.1

TDQS

A4.6/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 goes well beyond them: it discloses atomic registration in the same call, exact 422 error codes (VERIFACTU_REPRESENTATION_REQUIRED, VERIFACTU_ALWAYS_ON_IN_SANDBOX), and that disabling only stops submission without deactivating the company or changing its `ready` state. That is precisely the blast-radius information an agent needs before a destructive write.

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-loaded with the one-line purpose, then cleanly sectioned into writable fields, atomic registration, sandbox behavior, and a dedicated "Turning it off" block. Some content duplicates the schema's `enabled` text and the guardrails pointer is verbose, but nearly every sentence carries behavioral weight.

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, prerequisite-gated write with no output schema, the definition covers atomicity, failure modes, environment differences, and what the response carries on refusal. It also points to the guardrails resources needed to determine issuability beforehand, which is the remaining pre-call uncertainty.

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?

The description confirms `enabled` is the only writable field and is required, but that same fact is already spelled out in the schema's `enabled` and request-body descriptions, so little new meaning is added. `company_id` is not mentioned at all in the prose; the schema carries that burden with a detailed UUID/403 explanation. At 50% schema coverage, the baseline 3 fits.

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") and immediately clarifies that this is a full replacement rather than a partial merge. It also distinguishes itself from the sibling beel_get_verifactu_configuration by framing the write semantics, and routes the NIF-release case away to beel_activate_company / the DELETE activations endpoint.

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-to-use (turning VeriFactu on/off), explicit when-NOT-to-use (releasing the NIF is always `DELETE /v1/companies/{company_id}/activations`), and prerequisites (a signed and validated AEAT representation is required in Live). Sandbox exception is called out with its exact error code, leaving nothing to inference.

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