group_count
Count records grouped by a field value, such as orders by financialStatus or products by vendor, and get exact totals for enum and boolean fields or scanned estimates otherwise.
Instructions
Count records grouped by a field's value, e.g. orders by financialStatus or products by vendor. Exact for enum and boolean fields; other fields are counted by scanning (up to max_records) and say whether the result is exact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | For non-enum fields: how many groups to return, largest first (default 50) | |
| field | Yes | Scalar or enum field to group by, e.g. financialStatus | |
| model | Yes | Model name in singular camelCase, e.g. shopifyOrder | |
| filter | No | Optional filter applied before grouping | |
| max_records | No | For non-enum fields: records to scan (default 10000, max 20000) |