Stock and pricing
This stage checks whether you can build the board today, at the quantities people order. It reads stock and price for every part from the parts catalogue on disk.
Stock at design time answers the question for one board. inventory.sweep()
asks again at 1, 10, 25 and 100 boards. Twenty-five is a typical first run.
Where the figures come from
The sweep looks each part up once, by exact LCSC code, for the first quantity. The other quantities use the figures the part was resolved with.
| Setting | The lookup reads | The workbench says |
|---|---|---|
| Default | The catalogue on disk. Its figures are as old as that catalogue. | catalogue |
SOLDERMASK_PARTS=jlcsearch | jlcsearch, over the network | live |
The catalogue is the mirror's last daily build, or JLCPCB's own catalogue from
the last soldermask setup --parts. To see its date:
soldermask setupprints it on thepartsline, such as 723,227 components, from JLCPCB's API 2026-09-16.- The MCP
statustool returns it ascatalogue.built.
See Parts and packages.
With JLCPCB's API, the first quantity can disagree with the rest
With API credentials set and the Parts API granted, a part is resolved with the API's stock and price. The first quantity still reads the catalogue on disk, so its figures can differ from the other quantities.
Choosing the quantities
| Where | How |
|---|---|
| Command line | --qty N, repeated, replaces the four quantities. The stock line shows the smallest, and inventory.json holds them all. |
MCP build tool | quantities, a list of whole numbers |
| Workbench | Shows the quantities the build swept. The buttons on Cost switch between them. |
What each line reports
For every distinct part, the report lists:
| Column | Meaning |
|---|---|
| References | The parts on the board that use this code |
| Per board | How many one board needs |
| Needed | Per board × boards × 1.02 for assembly loss, rounded up. One board of a part used once needs 2. |
| Stock | Units the lookup reports |
| Unit price | The price at the quantity break the order lands in |
| Line cost | Unit price × needed |
| Risk | One of the four below |
| Risk | Meaning |
|---|---|
ok | Stock covers the run with margin |
tight | Stock is under five times what is needed. Stock moves between quote and order. |
short | Stock is under what is needed. This quantity cannot be built today. |
gone | The lookup shows no stock |
Totals
- A quantity is buildable when no line is
shortorgone. - Each quantity's total is the parts cost plus a setup fee of $3 per distinct extended part. Basic parts have no fee.
- The report also gives the cost per board.
- Headroom is stock ÷ needed. The workbench shows it as runs, and anything past a thousand as
999+×.
The whole report is saved in board.json under inventory. The projects page
and the version list show the one-board total as the cost.
The total is the parts, not the order
It leaves out the boards themselves, the assembly service and shipping. A part on the back needs JLCPCB's dearer Standard assembly. The fab check flags that: see JLCPCB's own table.
Stock never changes the verdict
The pass rule does not read the stock report. A board can pass and still be short at 100.
A failed lookup keeps the old figure
If the lookup for one part fails, or finds no row for its code, that line uses the figures from when the part was resolved.
Out of stock is not unresolved
A part that exists but has zero stock today still resolves. It shows as a
stock note and a gone line. Stock changes hourly, and a board should not be
lost to it. See Parts and packages.
KiCad and 3D models
Every version gets a KiCad board and schematic you can open and change. Its parts are drawn from the vendor's own 3D models.
Repair loop and evaluation
The pipeline can send its own findings back to the model, and a harness scores the whole pipeline. All of them judge a board by the same pass rule.