Skip to main content
Glama
digitalfactorysn

MCP Dolibarr Expert

add_invoice_line

Add a product or service line to an existing invoice with unit price, quantity, and tax rate. Use catalog product ID or a free-text description, optionally applying a discount.

Instructions

Ajouter une ligne de produit ou de service libre à une facture. Utiliser 'fk_product' pour un produit du catalogue ou 'desc' pour une ligne libre.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID de la facture
qtyYesQuantité
descNoDescription de la ligne (service libre ou nom du produit)
tva_txYesTaux TVA % (ex: 18 pour 18%)
subpriceYesPrix unitaire HT
fk_productNoID du produit catalogue (optionnel, pour ligne produit)
product_typeNo0=Produit physique, 1=Service. Défaut: 1
remise_percentNoRemise en % sur cette ligne (ex: 10 pour 10%)
Behavior2/5

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

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It indicates the action (add a line) and the two input styles, but it does not state potential side effects (e.g., invoice total recalculation), whether the line can be added to any invoice status, or what the response looks like. For a mutation tool, this is insufficient.

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 two short French sentences, front-loaded with the action and resource. It contains no filler and conveys the core purpose and mode distinction efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 8 parameters, no output schema, and no annotations, the description is too sparse. It omits a critical usage nuance: although desc and fk_product are schema-optional, the tool likely requires at least one of them to create a meaningful line. It also does not mention product_type implications, invoice status restrictions, or the outcome of the operation.

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 description coverage is 100%, so the baseline is 3. The description adds modest value by reinforcing that fk_product and desc are alternative ways to define the line, but it largely repeats what the parameter descriptions already say (e.g., desc is 'service libre ou nom du produit'). It does not clarify the implicit need to provide one of these despite both being optional in the schema.

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 uses a specific verb ('Ajouter une ligne') and clearly identifies the resource (une facture), which distinguishes it from sibling line-adding tools for orders, proposals, and supplier invoices. It also clarifies the two main modes (catalog product via 'fk_product' vs free line via 'desc').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context that this is for invoices and offers mode-selection guidance (fk_product vs desc), but it does not explicitly mention when not to use this tool compared to alternatives like add_order_line or add_supplier_invoice_line, nor any preconditions (e.g., invoice must be draft).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/digitalfactorysn/mcp-dolibarr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server