Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Create a customer invoice

dolibarr_invoice_create

Generate a draft customer invoice and add line items. Drafts have no accounting effect; validate the invoice later to finalize it.

Instructions

Creates a draft customer invoice and adds its lines. A draft has no accounting effect; validate it with dolibarr_invoice_action. To bill a sales order use dolibarr_invoice_create_from_order instead.

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": {
      "thirdparty_id": "<thirdparty_id>"
    },
    "name": "dolibarr_invoice_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoInvoice date; default today.
linesNo
note_publicNoNote visible to the third party (printed on documents).
note_privateNoInternal note.
ref_customerNo
custom_fieldsNoCustom fields by code, e.g. {"region": "north"}. Get codes and allowed values from dolibarr_custom_field_list.
thirdparty_idYes
payment_mode_idNoFrom dolibarr_dictionary payment_types.
payment_terms_idNoFrom dolibarr_dictionary payment_terms.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare non-read-only, non-destructive, non-idempotent; the description adds the genuinely important behavior beyond that — the created object is a draft with no accounting effect and requires a separate validation call. It does not cover whether lines can later be modified via dolibarr_invoice_line or what the call returns, which are real gaps but secondary.

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?

Three short sentences, zero waste, with the operation and its draft semantics front-loaded and the routing hints immediately after. Each sentence earns its place by adding a fact the agent needs before calling.

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 nine-parameter create with a nested line array and no output schema, the description covers the essential flow (create draft → validate elsewhere) and the main sibling alternative. It leaves the return payload and post-creation line editing unaddressed, but the schema handles the structural detail well enough that nothing critical to correct invocation is missing.

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?

The description adds no parameter-level meaning — everything about lines, dates, notes and payment ids comes from the schema, which is at 67% coverage. That coverage is decent for the nested line object (qty, vat_rate, product_id, free_line_kind all documented), so the schema carries the load, but the description contributes nothing extra such as line-format examples or thirdparty_id requirements.

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 ('Creates a draft customer invoice') plus the secondary effect ('adds its lines') and the lifecycle state it lands in (draft). It explicitly distinguishes itself from dolibarr_invoice_create_from_order, so an agent can route between the two without opening either 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?

Names two concrete alternatives with the condition that selects each: use dolibarr_invoice_create_from_order to bill a sales order, and use dolibarr_invoice_action to validate the draft. The implicit exclusion (don't use this to bill an order, don't expect a validated invoice) is spelled out rather than inferred.

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