Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Validate a customer invoice, set it back to draft, mark it paid or delete it

dolibarr_invoice_action
Destructive

Move a Dolibarr invoice through statuses—validate, set draft, mark paid/unpaid, or delete drafts—with preview unless confirm=true.

Instructions

Moves a invoice to another status. Actions: validate (the draft gets its final invoice number and becomes payable; this is an accounting document); set_draft (an unpaid validated invoice goes back to draft); set_paid (classifies the invoice as paid, writing off any remainder with the close_code); set_unpaid (a paid invoice becomes unpaid again); delete (deletes the invoice (drafts only, or the last invoice of the numbering)). This step cannot simply be undone: without confirm=true it only returns a preview.

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": {
      "invoice_id": "<invoice_id>",
      "action": "<action>"
    },
    "name": "dolibarr_invoice_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
reasonNoOne line on why, kept in the audit log. Required when confirm is true.
confirmNofalse (default) = change nothing, only show what would happen. true = do it. Set true only after the user has explicitly agreed to this exact step.
close_codeNoWith set_paid on an invoice not fully paid: why the rest is written off.
close_noteNoWith set_paid: a note on the write-off.
invoice_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and non-idempotent, and the description adds real context on top: without confirm=true nothing changes and only a preview is returned, the step 'cannot simply be undone', validation consumes the final invoice number and creates an accounting document, and reason is required once confirm is true. That is materially more than the annotations convey.

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?

Front-loaded with the status change, then a compact per-action enumeration, then the irreversibility/confirm warning last. Minor waste in the nested parenthetical for delete ('deletes the invoice (drafts only, or the last invoice of the numbering)') and the grammatical slip 'a invoice', but nothing extraneous.

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, non-idempotent mutation with six parameters and no output schema, the description covers action semantics, preconditions, and the preview safety gate well. It stops short of saying what the preview returns or whether deleting an invoice also removes its lines, which an agent may want before committing.

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 coverage is 67% and the schema descriptions for confirm, reason, close_code and close_note are already detailed. The description mainly reinforces the schema, adding only the coupling of close_code to set_paid and the write-off framing; invoice_id is never discussed. Baseline 3 fits since the schema does most of the work.

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 gives a specific verb and resource ('moves an invoice to another status') and then defines each of the five enum values precisely: validate assigns the final number and makes it payable, set_draft reverses an unpaid validated invoice, set_paid writes off the remainder, delete is limited to drafts or the last invoice of the numbering. The title pins the resource as a customer invoice, which separates it from dolibarr_supplier_invoice_action.

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?

Each action carries its own precondition (delete only for drafts or the last invoice, set_draft only for unpaid validated invoices, set_paid only for invoices not fully paid when a close_code is needed), and the confirm=false preview gate is spelled out. It does not route the agent to alternatives, notably dolibarr_invoice_record_payment for a normal payment versus set_paid for a write-off, which is the one ambiguity left.

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