store/get-stock reports a product’s stock level, its stock status and its backorder setting.
It also reports which record actually holds the number, which is the part that prevents the most common silent inventory mistake there is.
At a glance
| Ability | store/get-stock |
| Toolset | WooCommerce — toolset/woocommerce |
| Group | WooCommerce › Inventory |
| Requires | WooCommerce, active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
A variation can manage its own stock, or it can draw on its parent product’s. When the parent manages it, the variation still has a stock field — and that field is read by nothing. Writing to it changes a number no part of WooCommerce consults, and the shop carries on selling from the parent’s pool.
That failure is completely silent. The write succeeds, the number is visibly different, and stock behaviour does not change. It is the reason this ability exists.
So the response names the authority: managed_by_id is the record that holds the real number, managed_here says whether that is the product you asked about, and authoritative_stock is the quantity the shop actually uses. own_row_quantity is the raw field on the record you named, for comparison.
When those two differ, you are looking at a product somebody has already written to incorrectly.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
id | integer | Yes | Product or variation ID. |
What comes back
| Name | Type | What it is |
|---|---|---|
manage_stock | boolean | Whether stock is tracked at all. |
authoritative_stock | integer | The quantity the shop actually uses. |
own_row_quantity | integer | The raw field on the record you asked about. |
managed_by_id | integer | The record that holds the real number. |
managed_here | boolean | Whether that is the record you asked about. |
stock_status | string | In stock, out of stock or on backorder. |
backorders | string | The backorder setting. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
How many of the large black t-shirt do we have?
It resolves to one call:
{
"ability": "store/get-stock",
"parameters": {
"id": 8134
}
}Worth knowing
authoritative_stockis the real number.own_row_quantitymay be anything.managed_herefalse means writing to this record’s stock field does nothing.- Stock status is derived, not independent. It follows the quantity and the backorder setting.
- Always read this before adjusting stock on a variation.
Related abilities
- Adjust Stock — change it correctly
- List Low Stock — find what needs reordering
- Update Variation — switch a variation to its own stock
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category