Stock: levels, receive, count, adjust
stockStock of goods, every action of the Stock section on Prices (round 622). Read: action=levels (on hand, unit cost and value per product, negative stock named; as_of), movements (the newest stock movements with their notes and reasons; product, limit), history (one product's batches with their landed unit cost), warehouses, value (the stock value on as_of per warehouse, its total and the stock account in the books on that day, with the difference). Write, each proposed as one pending action carried out on release (release; the owner's switches decide): action=receive (product, quantity, unit_cost net, extra_cost: landed costs of the batch, kind purchase or opening, day, warehouse), count (product, quantity counted, reason, note, day, warehouse: the difference to the books is posted as a stock movement), adjust (product, change: plus or minus a quantity, reason needed, note), transfer (product, quantity, from, to: warehouse names, left out the main warehouse), copack_proposal (document_id: a co-packer's delivery note read, then assemble what it says), assemble (product, quantity, conversion_cost, batch: the components leave stock by the bill of materials), post_valuation (period YYYY-MM: the journal that brings the stock account to the stock value of the month's last day). reason is one of stock_take, damaged, expired, lost, found, sample, own_use, correction, other. Round 723, kept at once: action=reorder_level (product, quantity: the level below which an invoice line warns; empty clears it); action=warehouse_link (warehouse: a 3PL, method email, file or sftp, address: its email or sftp://..., ships_orders true): a confirmed customer order then goes to it as a shipping instruction (CSV); action=shipment (content: the warehouse's shipment confirmation as CSV or DESADV): the pieces shipped leave that warehouse, the delivery note is issued and the invoice drafted. Round 736: receive takes best_before (YYYY-MM-DD) and batch, and sales take the batch with the earliest date; assemble takes labour_cost, by_products (CRUMBS x 5 @ 0.40, or @ 10%, or no @ to share by quantity), best_before; the answer's warnings say where a batch trace is lost. Read: cost_history (product: every movement with the unit cost before and after), expiry (the batches by best before date), batch_trace (product, batch), reorder_points, reorder_proposal. Kept at once: reorder_point (product, warehouse, minimum, maximum, supplier), reorder_order (supplier, warehouse: the proposal as a purchase order), batch_change (batch_id, best_before, batch), write_off (batch_id, day), write_off_undo (batch_id: the movement), assembly_undo (batch: its reference); without the right to post these three are proposed for release; recipe (product, labour_cost per unit, by_products per unit). Round 1060, cost of goods: settings (read: method, posting periodic or perpetual, preset, suggested_method: fifo for goods with dates); posting (how: perpetual posts the cost of goods with each sale, one entry per channel and day or per invoice or delivery, and keeps the stock account at the stock's value every day; periodic: the stock journal at month end); book_perpetual (as_of: post what is not posted yet); by_day (period YYYY-MM: stock value, stock account and stock movement per day); wip (period, amount: work in progress at cost at the month end, booked in the month's stock journal). From the company's own software (an ERP, a warehouse system) through its API key: sale or return (product, quantity, day, reference: the delivery or invoice, or channel such as Amazon.co.uk, idempotency_key required: a retry with the same key books nothing new), proposed and carried out on release (at once under the owner's switch Post for the key); the cost of goods follows the posting. A cost of goods figure the software works out itself goes in as a journal. Round 1068: receive takes bought_from (the code of the company of the group that sold the goods); batch_change with batch_id and bought_from marks a batch so (product: the seller's own code where it differs; empty bought_from unmarks it); the group view then takes the seller's profit on it out of group stock. Round 1102, read: margins (date_from, date_to, by line, product, customer or month: revenue, cost of sales at the stock's own cost, margin and margin % per invoice line); trace (batch, product: the batch back to each supplier and purchase order, through the component batches of an assembly, and forward to every assembly, delivery, customer and invoice number); trace (document: an invoice, credit note or delivery note number) back to its batches; recall (batch, product, supplier: every customer and quantity delivered, with addresses, and what is still on hand); stocktakes; stocktake (number: the count sheet with on hand, counted, difference and value). Write, kept at once: stocktake_start (warehouse, day), stocktake_count (number, counts {product: counted}; an empty count clears it), stocktake_cancel (number). stocktake_post (number, account: left out the stock adjustment account): with the right to post the counts go into stock and the value of the differences is posted against the stock account; without it the posting is proposed for release. stocktake_undo (number): the posting reversed, stock as before; without the right to post proposed for release. margins also take Amazon settlement and Shopify sales without an invoice, by channel. Round 1104, production, each proposed for release: assemble takes warehouse (a co-packer's: the components leave it) and wastage (OATS 3%, BAG x 4: this run's wastage; empty the bill of materials' plan; above the plan to the wastage account); recipe takes wastage (OATS 2%: the planned wastage, part of the cost); disassemble (product, quantity, batch, warehouse: the components back into their batches at their cost); disassembly_undo (reference); assembly_start (product, quantity, batch, warehouse, wastage: the components leave now, held as work in progress); assembly_finish (reference, quantity made, conversion_cost, labour_cost, batch, best_before); assembly_cancel (reference); copack_fee (batch or reference, amount or document_id of the co-packer's bill: onto the finished batch's cost); send_components (product, quantity, to_warehouse: the components of a run moved to the co-packer). Read: in_production (the assemblies in production, work in progress at cost). Round 1105: stocktake_start with kind (a product type) counts only that type's products. can_assemble (product, quantity, warehouse): how many the components in stock make and what the quantity costs, before assemble. figures (product, left out all): on hand, allocated to order confirmations, available, on purchase orders, unit cost and value. Round 1129, a production run as the co-packer's batch report gives it, proposed for release: production_run (product: the finished good, quantity: the good units released, materials {code: quantity used, broken and spoilt included}, amount: the run charges net, batch, day: the run, date_to: released on, left out the run's day, minimum: the units planned, warehouse; write_off true for a failed batch, no quantity: its materials go to the wastage account). The materials leave at FIFO, the good units come in at materials plus charges. production_run_undo (reference). Read: production_runs (each run with its cost per good unit, yield and loss), by_account (stock items per stock account with their value and the ledger's). Round 1237, cost of goods of Amazon and the own shop, one cost for both: cost_of_goods (read: the original cost source, Rate changes, per product its source, cost per unit, steps and landed cost; the steps with rates and proposals); cost_source (product, method batch, dated or fixed: that product's own source; empty method the company's again); cost_set (product, unit_cost, day: valid from, left out tomorrow; how fixed for a fixed cost); cost_inbound_bill (batch_id, document_id of the transport bill or amount: onto the batch's cost per unit from today); cost_step_rate (channel amazon or d2c, kind labelling, transport, repacking, pick_pack or material, reference: the line's name, unit_cost: the rate per unit, day, product, reason; 0 switches a step off); cost_step_rule (channel, kind, reference, supplier, note: a bill line text, product: new bills of the supplier allocated to the step, the rate proposed from each); cost_step_rule_end (number); cost_step_approve (number, quantity: the units the bill covers, or unit_cost); cost_step_decline (number, reason); cost_follow_bills. A posted entry keeps the cost it was posted at.
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": {
"action": "<action>"
},
"name": "stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | ||
| day | No | ||
| how | No | ||
| kind | No | ||
| note | No | ||
| as_of | No | ||
| batch | No | ||
| limit | No | ||
| action | Yes | ||
| amount | No | ||
| change | No | ||
| counts | No | ||
| method | No | ||
| number | No | ||
| period | No | ||
| reason | No | ||
| account | No | ||
| address | No | ||
| channel | No | ||
| company | No | ||
| content | No | ||
| date_to | No | ||
| maximum | No | ||
| minimum | No | ||
| product | No | ||
| wastage | No | ||
| batch_id | No | ||
| document | No | ||
| quantity | No | ||
| supplier | No | ||
| date_from | No | ||
| materials | No | ||
| reference | No | ||
| unit_cost | No | ||
| warehouse | No | ||
| write_off | No | ||
| extra_cost | No | ||
| best_before | No | ||
| bought_from | No | ||
| by_products | No | ||
| document_id | No | ||
| labour_cost | No | ||
| ships_orders | No | ||
| to_warehouse | No | ||
| from_warehouse | No | ||
| conversion_cost | No | ||
| idempotency_key | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||