Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_create_customers_bulk

Idempotent

Create up to 500 customer records in one atomic call, with optional dry-run validation against AEAT registers, duplicate checks, and field-format verification before anything is saved.

Instructions

Creates up to 500 customers of this company in a single call.

  • Atomic: if any customer fails validation the whole batch is rejected with 422 BULK_VALIDATION_ERROR and nothing is persisted. This is not a partial operation.

  • dry_run: with dry_run=true the batch is only validated — tax identifiers against the AEAT register, duplicates inside the batch and against the existing customers, field formats — nothing is written and the answer is 200. With dry_run=false, the default, validation is followed by creation and the answer is 201.

  • Report: both modes return the same per-record report, so a dry run and a real run are read the same way.

Endpoint: POST /v1/companies/{company_id}/customers/bulk

⚠️ Fiscal guardrails — read before calling:

  • Why a name that does not match the census makes an invoice unsubmittable. (resource: beel://guardrails/nif-validation)

For the exhaustive rules and worked examples, call beel_docs_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
dry_runNoValidate the batch without persisting it (`true`), or validate and create it (`false`, the default). Either way the batch is atomic.
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. Changed22 schema fields changedv0.5.0
    • addedInput schema / $defs / Address / additionalProperties
      Added value: +false
    • removedInput schema / $defs / Address / properties / city / example
      Removed value: -"Madrid"
    • removedInput schema / $defs / Address / properties / country / example
      Removed value: -"España"
    • removedInput schema / $defs / Address / properties / country_code / example
      Removed value: -"ES"
    • removedInput schema / $defs / Address / properties / door / example
      Removed value: -"A"
    • removedInput schema / $defs / Address / properties / floor / example
      Removed value: -"2º A"
    • removedInput schema / $defs / Address / properties / number / example
      Removed value: -"123"
    • removedInput schema / $defs / Address / properties / postal_code / example
      Removed value: -"28001"
    • removedInput schema / $defs / Address / properties / province / example
      Removed value: -"Madrid"
    • removedInput schema / $defs / Address / properties / street / example
      Removed value: -"Calle Mayor, 123"
    • addedInput schema / $defs / CreateCustomerRequest / additionalProperties
      Added value: +false
    • removedInput schema / $defs / Email / example
      Removed value: -"user@example.com"
    • removedInput schema / $defs / IBAN / example
      Removed value: -"ES1234567890123456789012"
    • removedInput schema / $defs / NIF / example
      Removed value: -"12345678A"
    • addedInput schema / $defs / PaymentInfo / additionalProperties
      Added value: +false
    • removedInput schema / $defs / PaymentInfo / properties / payment_term_days / example
      Removed value: -30
    • removedInput schema / $defs / PaymentMethod / example
      Removed value: -"BANK_TRANSFER"
    • removedInput schema / $defs / Phone / example
      Removed value: -"+34 612 345 678"
    • removedInput schema / $defs / SWIFT / example
      Removed value: -"ABCDESMMXXX"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / body / 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."
  2. First observedv0.3.1

TDQS

A4.6/5.0
Behavior5/5

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

The annotations already signal read/write and idempotency, but the description goes well beyond them: atomicity with 422 BULK_VALIDATION_ERROR, exact 200 vs 201 responses for dry_run, duplicate/tax-identifier validation behavior, and identical per-record reports across modes. This is rich, accurate behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with bolded key behaviors, a clear endpoint line, and a safety callout. Every bullet conveys operationally important information without redundancy or fluff. It is appropriately detailed for a complex bulk operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with nested objects and no output schema, the description explains atomicity, validation, dry_run semantics, and the response code contract. The main gap is that it mentions a per-record report without describing its shape or contents, though it does point to docs_search for exhaustive rules.

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?

The input schema already documents most parameters in depth, and the description adds real meaning for dry_run: what validation is performed, what response codes result, and that nothing is persisted. It also reiterates the batch limit and ties the endpoint to company_id. This is meaningful value beyond 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?

The description opens with a specific verb, resource, and scope: 'Creates up to 500 customers of this company in a single call.' This clearly distinguishes it from single-customer creation and other bulk operations. The bulk limit and single-call behavior make the tool's purpose unambiguous.

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?

The description clearly sets the context: use this when creating up to 500 customers at once, and explains when to use dry_run (validation only). It does not explicitly name alternatives like beel_create_customer for single creations, but the usage context is stated rather than merely implied.

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