Skip to main content
Glama
Dolibarr MCP Server

Dolibarr MCP Server

Stock of a product

dolibarr_product_stock
Read-only

Retrieve a product's physical stock by warehouse and lot, including best-before and sell-by dates, plus virtual stock from open orders.

Instructions

Physical stock of one product per warehouse and, for lot-tracked products, per lot with best-before and sell-by dates. Also gives the virtual stock (physical plus open orders).

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

Input Schema

NameRequiredDescriptionDefault
productYesThe record's numeric id, or its ref exactly as shown in Dolibarr.

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 readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds real semantic value beyond that by defining what the returned figures mean — physical stock per warehouse, lot-level breakdown with expiry dates, and virtual stock defined as physical plus open orders. It does not cover behavior like missing-product handling or whether empty warehouses are included.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, front-loaded with the primary result (physical stock per warehouse) and then the supplementary virtual-stock definition. No filler. Slightly dense phrasing but every clause carries information.

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?

No output schema exists, so the description must convey the return shape, and it does: per-warehouse physical counts, per-lot detail with dates, and virtual stock. For a single-parameter read tool this is nearly sufficient; only edge-case behavior (unknown product, empty results) is unaddressed.

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 a single parameter and the schema already documents it at 100% coverage, including that it accepts a numeric id or a ref exactly as shown in Dolibarr. The description adds nothing about the parameter, so the baseline 3 applies.

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?

The description specifies the exact resource and granularity: physical stock of one product broken down per warehouse and, for lot-tracked products, per lot with best-before/sell-by dates, plus virtual stock. That is far more precise than a tautological restatement of the title. It does not explicitly contrast itself with siblings such as dolibarr_stock_movement_search, which keeps it from a 5.

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?

Usage is only implied: an agent can infer this is the tool for reading current stock levels of a single product. There is no explicit when-to-use, no exclusions, and no pointer to alternatives like the movement search or stock correction tools. Adequate but leaves routing to inference.

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