Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Add, change or remove a supplier invoice line

dolibarr_supplier_invoice_line

Add, update, or delete lines on a draft supplier invoice, including product, quantity, unit price, and VAT, to correct purchasing costs before validation.

Instructions

Edits the lines of a draft supplier 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": {
      "supplier_invoice_id": "<supplier_invoice_id>",
      "action": "<action>"
    },
    "name": "dolibarr_supplier_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).
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
supplier_invoice_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the description's main added value is the draft-only constraint, which is genuinely useful. It does not say what happens if the invoice is not a draft, whether a delete is recoverable, or what the call returns. There is a mild tension between the advertised "delete" action and destructiveHint=false, though removing a line from a draft is arguably a limited, non-destructive edit.

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 action-keyed clauses, front-loaded with the scope constraint, and no filler. Every sentence carries information the agent needs to pick the right parameter set.

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, the action semantics are well covered, but the description is silent on failure behavior for non-draft invoices and on the discount/VAT parameters. It is adequate to invoke the tool correctly in the common case but not complete.

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?

With 10 parameters at 70% schema coverage, the description adds real meaning by mapping parameters to actions and by explaining the product-line versus free-text-line fork (product_id/qty vs description/unit_price). It leaves discount_percent, vat_rate, and free_line_kind to the schema, which mostly documents them.

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 supplier invoice") and scopes it to draft invoices, which is a meaningful qualifier. It does not explicitly distinguish itself from the customer-side sibling dolibarr_invoice_line, but the resource and draft constraint make the target unambiguous.

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 per-action breakdown (add/update/delete) tells the agent which parameters each mode needs, which is real usage guidance. However, there is no statement of when to use this versus the invoice-level action tool, and no explicit exclusion beyond the implicit "draft" constraint.

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