Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_generate_recurring_invoice_now

DestructiveIdempotent

Trigger the pending recurring invoice now, outside its schedule: it consumes the current period and advances the next generation date, keeping the normal occurrence count.

Instructions

Runs the generation of this recurring template immediately, out of its schedule. It is a fiscal act: the generated invoice consumes numbering from the series of the template and, when the template says so, is issued and sent.

  • It brings the upcoming occurrence forward, it does not add one: the call consumes the period that was pending, so the invoice is created now and next_generation advances one period. Generating manually, skipping and letting the schedule run each consume exactly one occurrence, so a monthly template still produces twelve invoices a year however you mix the three.

  • next_generation in the response: the template's next date after this call consumed the pending occurrence, or null when the advance took the template past its end_date and its status is now COMPLETED.

  • An extra invoice outside the calendar: do not use this endpoint. Create a normal invoice, or derive a draft from one the template already generated with POST /v1/companies/{company_id}/invoices/derivations. Either way the schedule stays where it was.

Endpoint: POST /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/generate

⚠️ Fiscal guardrails — read before calling:

  • How BeeL derives the AEAT invoice type, and the rules each type imposes. (resource: beel://guardrails/invoice-types)

  • What regime_key means, where it lives, and which combinations are rejected. (resource: beel://guardrails/regime-keys)

For the exhaustive rules and worked examples, call beel_docs_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
recurring_invoice_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • 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.8/5.0
Behavior5/5

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

Adds major context beyond annotations: consuming series numbering, issuing/sending, advancing next_generation by one, becoming COMPLETED past end_date, and exact idempotency-collapse behavior. It also points to fiscal guardrails. No contradiction with annotations.

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?

Long but every bullet earns its place: occurrence consumption, response field, alternative routing, and guardrails. The first sentence is front-loaded and clear, and the bullets are scannable.

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 destructive fiscal operation it covers when to use it, side effects, response's next_generation, idempotency, and guardrail resources. With no output schema, the full response shape is not specified, though the docs pointer mitigates the gap.

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 covers company_id and idempotency_key in detail, and the description reinforces recurring_invoice_id as 'this recurring template' and its series. The only weak point is that recurring_invoice_id has no schema description and the description never explicitly maps that parameter name.

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 first sentence names the specific verb ('Runs the generation'), the resource ('this recurring template'), and the trigger condition ('immediately, out of its schedule'). The bullet 'it brings the upcoming occurrence forward, it does not add one' and the alternative-routing sentence distinguish it from create/derivation 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?

Explicitly says when not to use it: 'An extra invoice outside the calendar: do not use this endpoint.' It names alternatives: 'Create a normal invoice, or derive a draft... derivations.' The schedule-vs-manual consumption explanation also clarifies when manual generation is appropriate.

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