Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Create an invoice from a sales order

dolibarr_invoice_create_from_order

Creates a draft customer invoice from a sales order, copying its customer and lines and linking the invoice to that order. Use it to start invoicing an existing order without re-entering data.

Instructions

Creates a draft customer invoice with the customer and lines of a sales order, linked to it.

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

Input Schema

NameRequiredDescriptionDefault
order_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent. The description adds genuinely new behavioral facts: the result is a DRAFT invoice, it inherits the customer and lines from the order, and it is linked back to the order. It does not disclose duplicate-invoice behavior on repeat calls or the required order status, which remain gaps.

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?

A single well-formed sentence with the created artifact front-loaded and zero filler. Every clause (draft, customer, lines, linked) carries information.

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 one-parameter conversion tool with no output schema, the description covers what is produced but omits two things the caller needs: the order-status precondition and what is returned (presumably the new invoice id). Adequate but not complete.

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?

There is one required parameter (order_id) with 0% schema description coverage, so the description must compensate. It implies the id refers to the source sales order, but gives no format, range, or constraint detail beyond that inference.

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 (creates) plus a precise resource: a draft customer invoice derived from a sales order. The 'draft' qualifier and 'linked to it' distinguish it from the plain dolibarr_invoice_create sibling, but no sibling is named explicitly.

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 use case (converting a sales order into an invoice) is implied by the phrase 'with the customer and lines of a sales order'. There is no explicit guidance on when to prefer this over dolibarr_invoice_create, nor any precondition such as the order needing to be validated or not already invoiced.

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