---
name: "inventory_stocktake"
area: "inventory"
title: "Count a location"
price: "$0.002 per line counted"
method: "POST"
url: "https://api.conecto.chat/v1/tools/inventory_stocktake"
mcp_server: "https://api.conecto.chat/mcp/inventory"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/inventory/inventory_stocktake"
---

# Count a location (`inventory_stocktake`)

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

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).

Price: $0.002 per line counted. A call that fails costs nothing.

## Use it when

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

## Say this to your agent

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

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `location` | string | no | A location by name. Default: "Main" (made on first use). Up to 120 characters. |  |  |
| `counts` | array of objects | yes | 1 to 1000 items. |  |  |
| `counts[].sku` | string | yes, in each item of `counts` | The item's SKU. 1 to 64 characters. |  |  |
| `counts[].counted` | number or string | yes, in each item of `counts` | Up to 24 characters. |  |  |
| `full` | boolean | no |  |  | `false` |
| `note` | string | no | Up to 500 characters. |  |  |
| `date` | string | no | YYYY-MM-DD (matches ^\\d{4}-\\d{2}-\\d{2}$) |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `inventory_stocktake` on the MCP server `https://api.conecto.chat/mcp/inventory` with these arguments:

```json
{
  "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
    }
  ]
}
```

REST:

```bash
curl 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}]}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "inventory_stocktake",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.006",
  "balance_usd": "$19.75",
  "result": {
    "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
  }
}
```

`result`: 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.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `invalid_input` | 400 | A 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_stock` | 409 | Stock would go below 0 at a location. | Ship or move less; the message says how much there is. |
| `not_found` | 404 | No location has that name. | Call inventory_locations, or add it with inventory_save_location. |
| `archived` | 409 | The item or location is archived. | Use another one, or name a location that is in use. |
| `not_found` | 404 | No item has a SKU that was counted. | Add it with inventory_save_items first. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [inventory_save_items](https://conecto.chat/tools/inventory/inventory_save_items.md): Adds stock items or changes them by SKU: name, unit, barcode, cost, price and reorder point. $0.005 per item saved.
- [inventory_list_items](https://conecto.chat/tools/inventory/inventory_list_items.md): Items with their stock in total and per location, the moving-average cost and the value. Free up to 1,000,000 reads a month.
- [inventory_move](https://conecto.chat/tools/inventory/inventory_move.md): Changes stock, all moves or none: receive, ship, transfer between locations, or adjust. $0.005 per move.
- [inventory_history](https://conecto.chat/tools/inventory/inventory_history.md): Stock moves, newest first, of one item, at one location, of one kind, or in a period. Free up to 1,000,000 reads a month.
- [inventory_locations](https://conecto.chat/tools/inventory/inventory_locations.md): Every location with how many items it holds and their value. Free up to 1,000,000 reads a month.
- [inventory_save_location](https://conecto.chat/tools/inventory/inventory_save_location.md): Adds a location (a warehouse, a shop, a van), or renames, describes or archives one. $0.001 a call.
- [inventory_report](https://conecto.chat/tools/inventory/inventory_report.md): Valuation (what was held on a day and its value), movement (per item in a period, with the cost of goods shipped) or low stock. Free up to 1,000,000 reads a month.
- [inventory_import](https://conecto.chat/tools/inventory/inventory_import.md): Creates or changes items from a CSV in the file store, with optional quantities per location; all rows or none. $0.001 per row imported.
- [inventory_export](https://conecto.chat/tools/inventory/inventory_export.md): A CSV of the items (per location, with quantities and value) or of the moves in a period, with a download link. $0.001 a call.
