Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Record a payment received on a customer invoice

dolibarr_invoice_record_payment
Destructive

Records a customer invoice payment in Dolibarr by booking the full remaining amount due, returning a preview unless confirmed; no money is transferred.

Instructions

Records in Dolibarr that the customer paid an invoice. It books the whole amount still due; it moves no money. This step cannot simply be undone: without confirm=true it only returns a preview.

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": {
      "invoice_id": "<invoice_id>",
      "date": "<date>",
      "payment_mode_id": "<payment_mode_id>",
      "bank_account_id": "<bank_account_id>"
    },
    "name": "dolibarr_invoice_record_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesDate of the payment (YYYY-MM-DD).
reasonNoOne line on why, kept in the audit log. Required when confirm is true.
commentNo
confirmNofalse (default) = change nothing, only show what would happen. true = do it. Set true only after the user has explicitly agreed to this exact step.
invoice_idYes
close_invoiceNoMark the invoice as paid when the payment covers it.
bank_account_idYesBank account id, from dolibarr_api_get /bankaccounts. Needed when the Bank module is enabled.
payment_mode_idYesPayment type id, from dolibarr_dictionary payment_types.
payment_referenceNoCheque or transfer number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and non-idempotent, and the description adds the crucial context: it books the entire remaining amount, moves no money, and cannot simply be undone, with a default preview mode. That is exactly the behavioral detail an agent needs before invoking a destructive write.

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 what happens, then the money-movement clarification, then the irreversibility/preview warning. Every sentence carries distinct information with no repetition of the title or schema.

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 destructive mutation with no output schema, the description covers the essentials: effect, amount semantics, reversibility, and preview mode. Minor gaps remain around what the preview returns and the audit reason requirement, though the latter is documented in the schema.

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 documents date, confirm, close_invoice, payment_mode_id, bank_account_id, and reason. The description adds one meaningful point, that there is no partial-amount parameter because the whole remaining balance is booked, but says nothing about the remaining parameters beyond that. Baseline 3 is appropriate.

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 ('Records ... that the customer paid an invoice') and immediately scopes it: the full outstanding amount is booked and no money moves. The word 'customer' distinguishes it from the supplier-invoice sibling without needing to name it.

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?

The two-phase flow is made explicit: without confirm=true it only returns a preview, so the agent knows to dry-run first and confirm second. There is no exclusion guidance (e.g. when to prefer dolibarr_invoice_action or a supplier-invoice counterpart), which keeps it below a 5.

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