Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_generate_recurring_invoice_now

DestructiveIdempotent

Generate the pending recurring invoice now instead of waiting for its schedule, consuming that occurrence and moving the template’s next generation date forward.

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.

  • Templates with draft_in_advance: when the pending period's scheduled date is today or earlier, its review window has passed and the invoice is issued on the spot, dated today. When it is still ahead, the call creates the review draft with the scheduled date, and it is issued on that day.

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

BeeL API endpoint: POST /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/generate (reference: https://docs.beel.es)

⚠️ Read before calling:

  • Fiscal rules, domains simplified, taxes: beel_rules_list with domain, or resource beel://guardrails/.

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>",
      "recurring_invoice_id": "<recurring_invoice_id>"
    },
    "name": "beel_generate_recurring_invoice_now"
  }
}

Input 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_idYesUnique identifier (UUID) of the recurring invoice template, as returned when it is created or listed. A template of another company answers `404` with `RECURRING_NOT_FOUND`, exactly like one that does not exist.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.0
    • addedInput schema / properties / recurring_invoice_id / description
      Added value: +"Unique identifier (UUID) of the recurring invoice template, as returned when it is created or listed. A template of another company answers `404` with `RECURRING_NOT_FOUND`, exactly like one that does not exist."
  2. 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."
  3. 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 destructive and idempotent behavior, but the description adds substantial context beyond them: it is a "fiscal act" that consumes numbering from the template's series, may issue and send the invoice, advances `next_generation` by one period, and returns `null` when the template becomes `COMPLETED` past its `end_date`. It further explains `draft_in_advance` timing: if the pending period's scheduled date is today or earlier the invoice is issued immediately, otherwise a review draft is created for the scheduled date.

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?

The first sentence states the action immediately, and the bullet structure front-loads the most important behavioral distinction: it brings the upcoming occurrence forward rather than adding one. The description is long but each bullet carries operational meaning, including the response field, draft timing, and the explicit non-use case for extra invoices. The guardrails pointer at the end is useful without dominating the text.

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 fiscal mutation without an output schema, the description covers the critical consequences: numbering consumption, issuance and sending, occurrence consumption, `next_generation` advancement, and the `null` completed-state response. It also handles the `draft_in_advance` edge case and clearly routes the extra-invoice scenario elsewhere. An agent has enough context to call this correctly and understand the side effects.

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?

Schema description coverage is 100% and the schema already documents `company_id`, `recurring_invoice_id`, and `idempotency_key` in detail, including error behavior and idempotency-key tradeoffs. The description does not add parameter-specific meaning beyond that schema documentation. A baseline 3 is appropriate because the schema carries the parameter semantics.

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 and resource: it "runs the generation of this recurring template immediately, out of its schedule." It explicitly distinguishes the operation from skipping and letting the schedule run by explaining that all three consume exactly one occurrence. It also clearly excludes using this endpoint for an extra invoice outside the calendar, naming normal invoice creation and derivation as alternatives.

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?

Usage is explicitly bounded: "do not use this endpoint" for an extra invoice outside the calendar, with alternatives named (`POST /v1/companies/{company_id}/invoices/derivations` or a normal invoice). It also explains how manual generation relates to skipping and scheduled generation, so an agent knows when this tool is the right choice versus siblings like beel_skip_recurring_invoice and beel_create_recurring_invoice_derivation.

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