Inventory Tracker
Manage product stock levels. Check availability, atomically decrement on sale, increment on restock/cancellation, set exact quantities, and generate low-stock reports. Works on papi_product_variants.stock_quantity.
Endpoints (5)
Check stock levels for a product. Returns all variants with stock_quantity and in_stock boolean. For simple products (1 variant), returns a single item. For variable products, returns all variants — optionally filter by variant_id.
No input parameters required.
Atomically decrease stock after a sale. Race-condition safe: uses WHERE stock_quantity >= qty. Fails with error if insufficient stock. For simple products, variant_id is auto-resolved.
No input parameters required.
Increase stock for restock or order cancellation. No upper limit.
No input parameters required.
Set stock to an exact quantity. Use for inventory counts or corrections. Cannot set negative values.
No input parameters required.
Get all active product variants with stock at or below threshold. Sorted by stock_quantity ascending (lowest first). Useful for restock alerts.
No input parameters required.
MCP Tool Names
When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:
| Endpoint | MCP Tool Name |
|---|---|
| check-stock | inventory-tracker_check_stock |
| decrement-stock | inventory-tracker_decrement_stock |
| increment-stock | inventory-tracker_increment_stock |
| set-stock | inventory-tracker_set_stock |
| low-stock-report | inventory-tracker_low_stock_report |