Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Transfer stock between warehouses

dolibarr_stock_transfer
Destructive

Moves a product quantity between warehouses as linked stock movements and returns a preview unless confirm=true; provide a lot for lot-tracked products.

Instructions

Moves a quantity of a product from one warehouse to another, as two linked stock movements (out of the source, into the destination) sharing one inventory code. Lot-tracked products need the lot. 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": {
      "product_id": "<product_id>",
      "qty": "<qty>",
      "label": "<label>",
      "from_warehouse_id": "<from_warehouse_id>",
      "to_warehouse_id": "<to_warehouse_id>"
    },
    "name": "dolibarr_stock_transfer"
  }
}

Input Schema

NameRequiredDescriptionDefault
lotNoLot or serial number; required for lot-tracked products.
qtyYesQuantity in the product's base unit.
labelYesWhy: shown in the stock movement journal.
reasonNoOne line on why, kept in the audit log. Required when confirm is true.
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.
product_idYes
to_warehouse_idYes
from_warehouse_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, and the description adds genuinely new behavioral facts: the transfer materializes as two linked movements sharing one inventory code, lot-tracked products require a lot, and the operation cannot simply be undone. These are details an agent cannot derive from the annotation flags alone.

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, front-loaded with the operation and mechanism, then the lot caveat, then the irreversibility and preview warning. No sentence repeats the tool name or title, and nothing is padding.

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 an eight-parameter destructive mutation with no output schema, the description covers the critical risks (irreversibility, dry-run default, lot dependency). It leaves minor gaps around failure behavior, whether partial transfers can occur, and required permissions, which an agent might want before firing a real transfer.

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 63% and the parameters carry their own descriptions, including the confirm preview semantics and the reason-required-when-confirm note. The description echoes the lot requirement already documented in the schema and adds nothing about qty units, warehouse id resolution, or label usage, so it sits at the baseline for a partially documented schema.

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 ('Moves a quantity of a product from one warehouse to another') and immediately explains the underlying mechanism: two linked stock movements sharing one inventory code. This distinguishes it from the correction and search siblings without naming them, since the operation itself is unmistakable.

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 description implies the safe usage pattern by noting that without confirm=true it only returns a preview, but it never states when to choose this tool over dolibarr_stock_correct or dolibarr_product_stock, nor does it state preconditions such as stock availability at the source warehouse. Usage is implied rather than prescribed.

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