get-customers
Retrieve Shopify customers or search by name or email, select specific fields to reduce token usage, and return only a count when checking result size.
Instructions
Get customers or search by name/email. Supports field selection via 'fields' and 'countOnly' to get just the count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Cursor for forward pagination | |
| limit | No | Number of customers to return (default 10, max 250) | |
| before | No | Cursor for backward pagination | |
| fields | No | IMPORTANT: Always specify this to minimize token usage and avoid flooding context with unnecessary data. Only the listed fields will be fetched from the API and returned. 'id' is always included. If you are unsure which fields are needed, ask the user before fetching all fields. Example: ["id", "firstName"] returns only customer GID and firstName. Available: id, firstName, lastName, email, phone, createdAt, updatedAt, tags, defaultAddress, addresses, amountSpent, numberOfOrders | |
| reverse | No | Reverse the sort order | |
| sortKey | No | Sort key for customers | |
| countOnly | No | IMPORTANT: Use this to check result set size before fetching data. Returns only { count: N } without any resource data, saving significant context. Recommended before paginating large result sets. | |
| searchQuery | No | Freetext search or Shopify query syntax (e.g. 'country:US tag:vip orders_count:>5') |