Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_set_invoice_schedule

DestructiveIdempotent

Schedule or reschedule a draft invoice for a specific processing date and set its generation mode to draft-for-review or issue-and-send automatically.

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.

  • If-None-Match: *: without it, this call always replaces the scheduling whole — the behaviour integrators rely on. Send it to opt into the opposite: if the invoice is already scheduled, nothing is changed and the call fails with 412 INVOICE_ALREADY_SCHEDULED instead of silently overwriting the date and mode someone else set. Any other value, or omitting the header, keeps today's replace-whole behaviour.

BeeL API endpoint: PUT /v1/companies/{company_id}/invoices/{invoice_id}/schedule (reference: https://docs.beel.es)

⚠️ Read before calling:

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

  • The status names, the proforma lifecycle, and which tool performs each operation. (resource: beel://guardrails/invoice-state-machine)

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>",
      "invoice_id": "<invoice_id>",
      "body": "<body>"
    },
    "name": "beel_set_invoice_schedule"
  }
}

Input 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. Changed2 schema fields changedv0.10.0
    • addedInput schema / properties / body / type
      Added value: +"object"
    • addedInput schema / properties / invoice_id / type
      Added value: +"string"
  2. 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."
  3. First observedv0.3.1

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations: it documents the status transition to SCHEDULED, the 422 SCHEDULED_DATE_IN_PAST rejection, the scheduled_invoices feature requirement, and the full If-None-Match contract (omitting it = replace-whole; sending `*` = 412 INVOICE_ALREADY_SCHEDULED on conflict). That conditional-request nuance is precisely the destructive behavior an agent needs to know before overwriting someone else's schedule.

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 operation is stated up front, then bulleted by field and concern, so an agent can scan to the relevant detail. Every bullet carries a distinct fact (date constraint, mode semantics, feature flag, header contract) rather than restating the schema.

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, open-world mutation with no output schema, the description covers what changes, what errors arise, what feature must be enabled, and how to opt into conflict-safe behavior. Nothing material an agent needs before calling is missing.

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?

At 67% schema coverage, the description adds real value beyond the schema: it explains why generation_mode has no default (silent DRAFT fallback would downgrade an ISSUE_AND_SEND), plus the concrete error code for a past scheduled_for date. It also documents the If-None-Match header, which is not a declared schema parameter at all; company_id/invoice_id semantics are left to the schema, which already covers them well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource: it replaces the scheduling of a draft invoice and moves it to SCHEDULED, whether or not one existed. The phrase 'replaces the scheduling whole' functionally distinguishes it from a partial-update sibling, but the sibling (beel_patch_invoice_schedule) is never named, so full differentiation still requires inference.

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?

'Whether it had one or not' tells the agent no prior delete is needed, and the 'Read before calling' block names prerequisites (fiscal rules via beel_rules_list, invoice state machine) before invoking. It stops short of explicitly routing the agent to beel_patch_invoice_schedule for partial changes or beel_get_invoice_schedule for reads, so alternative selection is implied rather than stated.

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