Skip to main content
Glama

Octobooks

Stock: levels, receive, count, adjust

stock

Stock 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

NameRequiredDescriptionDefault
byNo
dayNo
howNo
kindNo
noteNo
as_ofNo
batchNo
limitNo
actionYes
amountNo
changeNo
countsNo
methodNo
numberNo
periodNo
reasonNo
accountNo
addressNo
channelNo
companyNo
contentNo
date_toNo
maximumNo
minimumNo
productNo
wastageNo
batch_idNo
documentNo
quantityNo
supplierNo
date_fromNo
materialsNo
referenceNo
unit_costNo
warehouseNo
write_offNo
extra_costNo
best_beforeNo
bought_fromNo
by_productsNo
document_idNo
labour_costNo
ships_ordersNo
to_warehouseNo
from_warehouseNo
conversion_costNo
idempotency_keyNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description adds substantial context beyond that: writes are proposed and carried out on release unless the owner's switch applies, posting rights change whether stocktake/assembly/write-off actions are immediate or proposed, idempotency_key is required for API sales retries, and warnings flag where a batch trace is lost. The one soft spot is that write_off, stocktake_cancel and undo actions sit under destructiveHint=false without stating whether they are reversible beyond the presence of undo actions.

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

Conciseness2/5

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

The whole definition is one enormous run-on block punctuated by internal changelog markers ('Round 622', 'Round 723', 'Round 1104', 'Round 1237') that add no value to an agent choosing an action and actively fragment the action list. Read/Write labels give some structure, but related actions for the same field are scattered across rounds, so an agent must scan the entire text to find one action's parameters.

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 47-parameter dispatcher with an output schema available, the description is unusually complete: it covers reads, immediate writes, release-proposed writes, permission-dependent behaviour, external API ingestion and cost-of-goods settings. The gaps are organizational rather than substantive, though the absence of any mapping from intent to action leaves the agent to reconstruct that itself.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 47 parameters, so the description carries the entire burden and mostly succeeds: it defines formats for by_products ('CRUMBS x 5 @ 0.40, or @ 10%'), wastage ('OATS 3%, BAG x 4'), materials, counts, reason enums, best_before format and period format. A few parameters (by, company, note, amount) are only inferable from context rather than stated, which keeps it below a 5.

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 opening sentence names the resource (stock of goods) and states this is the whole Stock section, then enumerates concrete actions (levels, movements, receive, count, adjust, transfer, stocktakes, production runs, cost of goods). An agent can tell what domain it covers, but there is no differentiation from the sibling stock_intake or from release/settings, so it is clear without being routed.

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 implied by the action list and by the Read:/Write: split, and the description does explain that writes become pending actions carried out on release and that some actions are auto-kept. However there is no explicit 'use this when' guidance, no rule for choosing among the ~60 actions for a given intent, and no statement of when to prefer stock_intake instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources