Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Add, change or remove a invoice line

dolibarr_invoice_line

Add, update, or delete lines on a draft Dolibarr invoice, using a product id or free-text description with quantity and unit price.

Instructions

Edits the lines of a draft invoice. add: qty and product_id (or a description and unit_price for a free-text line). update: line_id and the fields to change. delete: line_id.

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_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
qtyNoQuantity.
actionYes
line_idNoNeeded for update and delete.
vat_rateNoVAT rate in percent. Leave out for the product's default rate (0 on a free-text line).
invoice_idYes
product_idNoProduct or service id. Leave out for a free-text line.
unit_priceNoUnit price before tax. Leave out on a product line to use the product's price.
descriptionNoLine text. Required for a free-text line.
free_line_kindNoOnly for a free-text line (no product_id): whether it is a service or goods.service
discount_percentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior1/5

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

The description says delete removes an invoice line, while annotations declare destructiveHint=false; that is a direct contradiction. Beyond the contradiction, it does disclose the draft-only state constraint, but the contradiction dominates.

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?

Two compact sentences, front-loaded with the scope and then action rules; no filler.

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

Completeness3/5

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

For a 10-parameter mutation tool with no output schema, it covers the main action paths and the draft-only constraint, but leaves several optional parameters such as vat_rate, discount_percent, and free_line_kind, plus return and error behavior, undocumented. Adequate but incomplete for the tool's complexity.

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 70% and documents several fields, while the description adds conditional logic for product lines versus free-text lines and action-specific required fields. It still leaves discount_percent, invoice_id, and some update-field semantics to the schema or inference.

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 states the resource (invoice lines), the object state (draft invoice), and enumerates add/update/delete with per-action inputs. This clearly distinguishes line editing from invoice-level tools by focus and scope.

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?

It gives clear when-to-use guidance by action and restricts operation to draft invoices; add, update, and delete each have required inputs described. It does not explicitly name a sibling alternative or state when not to use, so it is not a full 5.

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