Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_set_invoice_schedule

Idempotent

Set a draft invoice's schedule by choosing a future processing date and generation mode, moving it to SCHEDULED for manual review or automatic issuance and sending.

Instructions

Replaces the scheduling of a draft invoice, whether it had one or not, moving it to SCHEDULED. Both fields of the body are required.

  • scheduled_for: the date the invoice is processed on. Today or later; an earlier date is rejected with 422 SCHEDULED_DATE_IN_PAST.

  • generation_mode: DRAFT leaves the invoice as a draft for manual review, ISSUE_AND_SEND issues and sends it automatically. There is no default.

  • Availability: requires the scheduled_invoices feature.

Endpoint: PUT /v1/companies/{company_id}/invoices/{invoice_id}/schedule

⚠️ Fiscal guardrails — read before calling:

  • When an invoice can still be changed, and what to do once it cannot. (resource: beel://guardrails/invoice-state-machine)

For the exhaustive rules and worked examples, call beel_docs_search.

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.
invoice_idYesInvoice ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.5.0
    • addedInput schema / $defs / SetInvoiceScheduleRequest / additionalProperties
      Added value: +false
    • removedInput schema / $defs / SetInvoiceScheduleRequest / properties / scheduled_for / example
      Removed value: -"2025-02-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.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the full-replacement semantics, the state transition to SCHEDULED, the 422 SCHEDULED_DATE_IN_PAST error, the absence of a default for generation_mode, and the feature requirement. It also points to fiscal guardrails and docs for edge cases, which is substantial behavioral context.

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 and front-loaded: the core behavior comes first, then bulleted field semantics, availability, endpoint, guardrails, and a pointer to exhaustive docs. Every sentence earns its place without padding.

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 complex fiscal mutation, the description covers required fields, error behavior, feature gating, endpoint, guardrails, and where to find exhaustive rules. Combined with the existing schema descriptions, an agent has enough information to invoke the tool correctly.

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 description adds meaningful semantics for scheduled_for and generation_mode beyond the schema: processing date, past-date rejection, DRAFT vs ISSUE_AND_SEND behavior, and no default. The company_id parameter is already richly documented in the schema, so the description doesn't need to repeat it.

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 states a specific verb, resource, and effect: 'Replaces the scheduling of a draft invoice, whether it had one or not, moving it to SCHEDULED.' This clearly distinguishes it from sibling tools like beel_get_invoice_schedule, beel_delete_invoice_schedule, and beel_set_invoice_status.

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?

It gives clear context on when to use it: for draft invoices that need scheduling or rescheduling, and it explicitly notes the prerequisite feature and the requirement that both fields be supplied. It does not explicitly name sibling tools as alternatives, but the scope is clear enough that an agent can route correctly.

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