query_counts
ChatGPTLIVE. Read inventory audit/count sessions (default purpose=AUDIT), with optional OPENING_STOCK/WAREHOUSE_ADJUSTMENT. List sessions, summarize matching lines by product/location/status/day or retrieve paginated lines by sessionIds/countNumbers. Filter statuses, location, product attributes and counted/uncounted/discrepancy state. Only explicitly counted rows contribute to discrepancies, including confirmed zero. APPLIED differs from DRAFT/SUBMITTED. Optional includeValues uses current location RETAIL then global RETAIL prices; check missing-price/expected warnings. Direct record identifiers bypass dates. Business data is read-only; arbitrary SQL is never accepted. Pass pagination.nextCursor unchanged to continue. Inventory tools default to 20 rows, max 50; optional includeTotals describes all matching results, not just the page.





