Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Add, change or remove a order line

dolibarr_order_line

Add, update, or delete line items on a draft Dolibarr order, including product quantities, free-text lines, prices, VAT, and discounts.

Instructions

Edits the lines of a draft order. 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": {
      "order_id": "<order_id>",
      "action": "<action>"
    },
    "name": "dolibarr_order_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
qtyNoQuantity.
actionYes
line_idNoNeeded for update and delete.
order_idYes
vat_rateNoVAT rate in percent. Leave out for the product's default rate (0 on a free-text line).
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
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the safety profile is largely covered. The description adds the meaningful behavioral constraint that only draft orders are editable, but it omits permissions needed, whether deleted lines are recoverable, and what an invalid action/state returns. Note the mild tension between a 'delete' mode and destructiveHint=false, though removing a draft line is plausibly reversible.

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?

Three compact sentences, action-prefixed clauses, no filler, and the draft-order precondition is front-loaded. Slightly telegraphic for an agent scanning mode-specific requirements, but nothing is wasted.

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?

With 10 parameters, 70% schema coverage and no output schema, the action-to-parameter mapping is well covered, but several parameters (vat_rate, discount_percent, free_line_kind, qty on update) are left to the schema. It never states what the call returns (e.g. the new line_id after add), which matters for a tool whose update/delete modes require that id.

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?

Adds real meaning beyond the schema by mapping the action enum to its required parameters and by explaining the free-text-line alternative (description + unit_price instead of product_id). It still leaves vat_rate, discount_percent and free_line_kind's role in the add flow unexplained, which keeps it off a 5 despite 70% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Edits the lines of a draft order') and the 'lines' framing separates it from the order-level tools like dolibarr_order_update. It stops short of naming any sibling or drawing the boundary explicitly, so an agent must infer the split itself.

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?

Gives clear per-action routing ('add: qty and product_id', 'update: line_id and the fields to change', 'delete: line_id') plus a precondition that the order must be a draft. It does not say what happens on a non-draft order or which sibling to use to change order headers, so exclusion guidance is partial.

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