Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Create a supplier order

dolibarr_supplier_order_create

Creates a draft supplier purchase order with line items, defaulting product prices to the supplier's price. Use it to prepare supplier orders before validating or sending them.

Instructions

Creates a draft purchase order with its lines. Product lines without unit_price use the supplier's price for that product. The standard API cannot edit the lines of an existing supplier order: get the lines right here, or delete the draft and create it again. Validate, approve and send it with dolibarr_supplier_order_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>",
      "lines": "<lines>"
    },
    "name": "dolibarr_supplier_order_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoOrder date; default today.
linesYes
note_publicNoNote visible to the third party (printed on documents).
note_privateNoInternal note.
ref_supplierNoThe supplier's reference for this order.
custom_fieldsNoCustom fields by code, e.g. {"region": "north"}. Get codes and allowed values from dolibarr_custom_field_list.
delivery_dateNoExpected delivery date.
thirdparty_idYesSupplier id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-idempotent, non-destructive write in a closed world; the description adds traits beyond that, notably that the result is an unvalidated draft and that line items are immutable afterwards. It does not say whether the created draft's id/ref is returned, which the agent needs to chain into the action tool, so it stops short of full behavioral disclosure.

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 sentences, each carrying distinct load: purpose, line-pricing rule, immutability constraint plus next-step tool. Front-loaded with the core action and no redundant restatement of the title or name.

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 nested, 8-parameter mutation with no output schema, the description covers the operation, key semantics and follow-up workflow well. The remaining gap is return value — the agent is not told that an order id/ref comes back so it can be passed to dolibarr_supplier_order_action.

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 88%, so the baseline is 3, but the description adds real meaning beyond it: 'Product lines without unit_price use the supplier's price for that product' explains the null/omitted semantics of unit_price and the product-line vs free-text line split. It does not cover thirdparty_id vs ref_supplier or date defaults, which the schema already handles.

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?

States a specific verb and resource with scope: 'Creates a draft purchase order with its lines.' The word 'draft' plus 'supplier order' distinguishes it from dolibarr_order_create (customer side) and from dolibarr_supplier_order_update/action, so an agent can route without inspecting the schema.

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

Usage Guidelines5/5

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

Gives explicit downstream routing ('Validate, approve and send it with dolibarr_supplier_order_action') and an explicit constraint with a workaround ('The standard API cannot edit the lines of an existing supplier order: get the lines right here, or delete the draft and create it again'). This tells the agent both what to do next and why it must be exhaustive now.

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