Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Create a supplier invoice

dolibarr_supplier_invoice_create

Record a draft supplier invoice and its line items; product lines without a unit price use the supplier's product price. Validate it afterward with the supplier invoice action tool.

Instructions

Records a draft invoice received from a supplier, with its lines. Product lines without unit_price use the supplier's price for that product. Validate it with dolibarr_supplier_invoice_action.

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>",
      "ref_supplier": "<ref_supplier>"
    },
    "name": "dolibarr_supplier_invoice_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoInvoice date; default today.
labelNo
linesNo
due_dateNoDate as YYYY-MM-DD.
note_publicNoNote visible to the third party (printed on documents).
note_privateNoInternal note.
ref_supplierYesThe supplier's invoice number (required, unique per supplier).
custom_fieldsNoCustom fields by code, e.g. {"region": "north"}. Get codes and allowed values from dolibarr_custom_field_list.
thirdparty_idYesSupplier id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare a non-read-only, non-destructive, non-idempotent write. The description adds genuine behavioral context beyond that: the record is created as a draft requiring a separate validation call, and omitted unit prices are resolved from a default rather than failing. It does not explain what happens on a duplicate ref_supplier, which matters given idempotentHint=false, nor any permission requirements.

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, front-loaded with the action and scope, followed by the one non-obvious pricing rule and the required follow-up call. No filler or restatement of the title.

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 tool with a nested lines array and no output schema, the description covers the essentials: draft status, line creation, price-defaulting, and the validation path. Minor gaps remain around supplier-only thirdparty validation, ref_supplier uniqueness failure, and custom_fields, though the schema documents the latter.

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 coverage is 78%, so the schema already explains most parameters. The description contributes pricing-default behavior at the tool level, but it describes the default as 'the supplier's price' while the schema's unit_price text says 'the product's price' - a discrepancy that could mislead an agent rather than clarify. No other parameter meaning is added.

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 ('Records a draft invoice received from a supplier, with its lines') and pins the lifecycle stage to draft, which separates it from the validated-invoice path. It implies lines are supplied at creation, distinguishing it from the line-level sibling, but never names other invoice creation tools such as the order-derived or customer variants.

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 a clear next step and alternative by naming dolibarr_supplier_invoice_action as the validation tool, so an agent knows this call alone leaves the invoice in draft. There is no explicit when-not guidance, e.g. when to instead convert a received supplier order or add lines afterwards with dolibarr_supplier_invoice_line.

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