Inventory

Count a location

inventory_stocktake · Changes data · Markdown

Records a count of one location; each difference from the books becomes a count move.

$0.002 per line counted

From your agent’s balance. A call that fails costs nothing.

An example

We counted the test kitchen: 4 combi steamers, 6 beech bistro chairs and 3 work tables.

Your agent callsinventory_stocktake$0.002 per line counted

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "location": "Test kitchen",
  "note": "Monthly count, October",
  "counts": [
    {
      "sku": "STEAMER-CS10",
      "counted": 4
    },
    {
      "sku": "CHAIR-BISTRO-BEECH",
      "counted": 6
    },
    {
      "sku": "TABLE-SS-160",
      "counted": 3
    }
  ]
}
What comes back
{
  "stocktake_id": 4101,
  "location": "Test kitchen",
  "date": "2026-10-14",
  "lines": [
    {
      "sku": "CHAIR-BISTRO-BEECH",
      "expected": "7",
      "counted": "6",
      "difference": "-1",
      "value": "-140.00"
    },
    {
      "sku": "STEAMER-CS10",
      "expected": "4",
      "counted": "4",
      "difference": "0",
      "value": "0"
    }
  ],
  "differences": 1
}

Use it when

Stock was counted, at a month end or after a move.

What it does

Record a count of one location: each difference from what the moves left there becomes a count move (found stock comes in at the moving average, missing stock leaves at it), so the stock matches what was counted. With full: true, items held there but left out of counts were not found (counted 0).

What comes back

The stocktake_id, location and date, a line per item with what was expected, counted, the difference and its value, and how many differences there were. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
locationstringA location by name. Default: "Main" (made on first use). Up to 120 characters.
countsRequiredarray of objects1 to 1000 items.
counts[].skuRequiredstringThe item's SKU. 1 to 64 characters.
counts[].countedRequirednumber or stringUp to 24 characters.
fullbooleanDefault: false.
notestringUp to 500 characters.
datestringYYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$.

The call

Over MCP, call inventory_stocktake on https://api.conecto.chat/mcp/inventory. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/inventory_stocktake \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"Test kitchen","note":"Monthly count, October","counts":[{"sku":"STEAMER-CS10","counted":4},{"sku":"CHAIR-BISTRO-BEECH","counted":6},{"sku":"TABLE-SS-160","counted":3}]}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
invalid_input400A quantity, cost or date is not valid.Send numbers like 140.00 (a dot for decimals) and dates that have passed, like 2026-10-14.
not_enough_stock409Stock would go below 0 at a location.Ship or move less; the message says how much there is.
not_found404No location has that name.Call inventory_locations, or add it with inventory_save_location.
archived409The item or location is archived.Use another one, or name a location that is in use.
not_found404No item has a SKU that was counted.Add it with inventory_save_items first.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md