Skip to main content
Glama
BeeL MCP server

BeeL MCP server

Official
by beel-es

beel_set_invoice_status

DestructiveIdempotent

Updates an invoice's commercial status to ISSUED, SENT, or PAID and rejects invalid transitions, allowing you to mark invoices sent or paid or undo a mistaken SENT.

Instructions

Sets the commercial status of an invoice. Any transition other than the ones below is rejected.

  • PAID: from ISSUED, SENT or OVERDUE.

  • SENT: from ISSUED.

  • ISSUED: from SENT only, to undo a SENT set by mistake.

  • Not set here: issuing and voiding are fiscal acts with their own operations (POST …/{invoice_id}/issue, POST …/{invoice_id}/void), and issuing is never undone.

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

⚠️ Read before calling:

  • 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_status"
  }
}

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. Changed1 schema field changedv0.9.0
    • changedInput schema / $defs / PaymentMethod / description
      Previous value: -"Payment method for invoices and recurring invoices.\nNONE means no payment information will be shown.\n"New value: +"Payment method shown on invoices and recurring invoices.\n\n- `NONE`: no payment information is shown.\n- `BANK_TRANSFER`: bank transfer to the IBAN of the payment details; the only method\n  that requires an IBAN.\n- `CARD`: card payment.\n- `CASH`: cash payment.\n- `CHECK`: payment by cheque.\n- `DIRECT_DEBIT`: direct debit from the customer's bank account.\n- `BIZUM`: payment through Bizum.\n- `OTHER`: any other method.\n"
  3. Changed11 schema fields changedv0.5.0
    • removedInput schema / $defs / IBAN / example
      Removed value: -"ES1234567890123456789012"
    • addedInput schema / $defs / PaymentInfo / additionalProperties
      Added value: +false
    • removedInput schema / $defs / PaymentInfo / properties / payment_term_days / example
      Removed value: -30
    • removedInput schema / $defs / PaymentMethod / example
      Removed value: -"BANK_TRANSFER"
    • removedInput schema / $defs / SWIFT / example
      Removed value: -"ABCDESMMXXX"
    • addedInput schema / $defs / SetInvoiceStatusRequest / additionalProperties
      Added value: +false
    • removedInput schema / $defs / SetInvoiceStatusRequest / properties / payment_date / example
      Removed value: -"2025-01-15"
    • removedInput schema / $defs / SetInvoiceStatusRequest / properties / sent_at / example
      Removed value: -"2025-01-29T18:45:00Z"
    • 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."
  4. First observedv0.3.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered structurally. The description adds real behavioural context beyond that: the domain rejects illegal transitions, ISSUED is only a corrective undo of SENT and never un-issues an invoice, and issuing is irreversible. It stops short of describing the error response or confirmation behaviour on a rejected transition.

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?

Front-loaded one-line purpose followed by a scannable transition list and a short warning block. Every sentence earns its place; the only mild redundancy is repeating the transition table that also appears in the schema's status description, which is justified for tool selection.

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, idempotent mutation with a nested body and no output schema, the description covers the critical unknowns: legal transitions, what each status does to sent_at, and which operations belong elsewhere. It could add the failure/error semantics on a rejected transition, but nothing essential for correct invocation 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?

Schema coverage is 67%, so the schema already documents status, sent_at, payment_date and the nested payment object. The description still adds meaning by framing status as a transition rather than a free assignment and by clarifying the ISSUED/SENT relationship, though it says nothing about sent_at/payment_date that the schema does not already state.

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?

States a specific verb and resource ('Sets the commercial status of an invoice') and immediately scopes it by listing the only permitted transitions. It also names the sibling operations that are explicitly NOT this tool (issue and void endpoints), so an agent can distinguish it from beel_issue_invoice and beel_void_invoice without opening any schema.

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 enumerates when each target status is allowed ('PAID: from ISSUED, SENT or OVERDUE') and provides an explicit when-not section redirecting to POST …/issue and …/void for fiscal acts. It also directs the agent to the guardrail resource for the full state machine, which is exactly the alternative-selection guidance an agent needs.

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