Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_create_invoice_batch

DestructiveIdempotent

Process up to 50 invoices in one batch: issue drafts or move them to a new status, with individual success/failure reported for each invoice.

Instructions

Applies one operation to a set of invoices of this company and reports, invoice by invoice, which succeeded and which failed.

  • Operations: ISSUE issues the draft invoices; STATUS moves them to the new_status given in the body.

  • Limit: up to 50 invoices per request (invoice_ids).

  • Not atomic: each invoice is processed on its own, and since issuing is irreversible, the ones already issued stay issued if a later one fails.

  • Related: downloading PDFs, sending email and exporting are not operations of this batch — use …/invoices/pdf-archive, …/invoices/deliveries and …/invoices/exports.

Endpoint: POST /v1/companies/{company_id}/invoices/batches

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.
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. Changed5 schema fields changedv0.5.0
    • addedInput schema / $defs / CreateInvoiceBatchRequest / additionalProperties
      Added value: +false
    • removedInput schema / $defs / CreateInvoiceBatchRequest / properties / payment_date / example
      Removed value: -"2025-01-15"
    • removedInput schema / $defs / UUID / example
      Removed value: -"550e8400-e29b-41d4-a716-446655440000"
    • 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."
  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 description significantly exceeds the annotations by disclosing non-atomicity, irreversibility of issuance, the 50-invoice cap, and the per-invoice result shape. It makes real side-effect behavior explicit despite idempotentHint/destructiveHint already present.

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?

Well-organized with a clear summary sentence followed by scannable bullets. Every bullet adds distinct information, and there is no filler or repetition of schema content.

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 mutating batch operation without an output schema, the description conveys the essential behaviors: non-atomicity, result reporting, limit, and operation modes. It does not spell out the exact response payload or error codes, but the per-invoice reporting statement and richer schema descriptions fill most operational gaps.

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 only lightly touches parameter semantics (operations, new_status, invoice_ids limit); the schema itself carries detailed descriptions for body, company_id, and idempotency_key. With 67% schema coverage and strong schema prose, the description neither needs nor adds much parameter-level detail.

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 ('applies one operation') and resource ('set of invoices'), names the two operations (ISSUE/STATUS), and states per-invoice success/failure reporting. It also explicitly carves out sibling concerns (PDFs, email, exports), so an agent can distinguish it from nearby tools.

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-not guidance and names the alternative endpoints/sub-resources for downloading PDFs, sending email, and exporting. The operation semantics (ISSUE vs STATUS, new_status requirement) also clarify when each mode should be selected.

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