# list_product_groups

List product groups with filtering, sorting, and cursor-based pagination. Filter by workspace ID(s), type, activation
state (ACTIVE/INACTIVE), or the published shortcut. Each item includes the product count, publishing window,
marketing name, and cancelation-policy details. Use get_product_group for detailed relationships and configuration.

<!-- INPUT_BLOCK_START -->

## Input

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `first` | `number` | No | Number of results to return (forward pagination, max 25). Defaults to 25 if neither first nor last is provided. |
| `after` | `string` | No | Cursor for forward pagination. Pass the endCursor from the previous page. |
| `last` | `number` | No | Number of results to return (backward pagination, max 25). Use with before for reverse paging. |
| `before` | `string` | No | Cursor for backward pagination. Pass the startCursor from the previous page. |
| `filters` | `ListProductGroupsFilters` | No | Filter criteria. Examples: { "workspaceIds": ["3"] }, { "type": { "eq": "STUDENT" } }, { "state": "ACTIVE" }, { "published": true }. - [ListProductGroupsFilters](#listproductgroupsfilters) |
| `sort` | `ListProductGroupsSort` | No | Sort order. Example: { "updatedAt": "DESC" } for most recently updated first. - [ListProductGroupsSort](#listproductgroupssort) |

### ListProductGroupsFilters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceIds` | `string[]` | No | Filter by one or more workspace IDs (results will include product groups in any of the listed workspaces) |
| `state` | `ProductGroupState` | No | Filter by activation state: ACTIVE or INACTIVE - [ProductGroupState](#productgroupstate) |
| `published` | `boolean` | No | Shortcut filter: true matches state=ACTIVE AND publish_state=ONGOING. false matches any other combination. |
| `type` | `ProductGroupTypeFilter` | No | Filter by product group type using STUDENT, SHORT_STAY or RESIDENTIAL - [ProductGroupTypeFilter](#productgrouptypefilter) |
| `internalReference` | `StringFilter` | No | Filter by internal reference (use search for partial match, eq/in for exact values) - [StringFilter](#stringfilter) |
| `tags` | `unknown` | No | Filter by associated tags (e.g. { key: { eq: "premium" } }) |

### ListProductGroupsSort

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `updatedAt` | `SortDirection` | No | Sort by last update date (DESC for most recently updated first) - [SortDirection](#sortdirection) |

### ProductGroupTypeFilter

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `eq` | `ProductGroupType` | No | Equals: match the specified product group type - [ProductGroupType](#productgrouptype) |
| `neq` | `ProductGroupType` | No | Not equals: exclude the specified product group type - [ProductGroupType](#productgrouptype) |
| `in` | `ProductGroupType[]` | No | In: match any of the specified product group types - [ProductGroupType](#productgrouptype) |
| `nin` | `ProductGroupType[]` | No | Not in: exclude the specified product group types - [ProductGroupType](#productgrouptype) |

### StringFilter

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `eq` | `string` | No | Equals: exact match |
| `neq` | `string` | No | Not equals: exclude exact match |
| `in` | `string[]` | No | In: match any value in the array |
| `nin` | `string[]` | No | Not in: exclude values in the array |
| `search` | `string` | No | Full-text search: partial/fuzzy match |

### ProductGroupState

| Value | Description |
| --- | --- |
| `ACTIVE` | Product group is active and available for booking |
| `INACTIVE` | Product group is inactive and not available for booking |

### SortDirection

| Value | Description |
| --- | --- |
| `ASC` | Ascending: oldest first |
| `DESC` | Descending: newest first |

### ProductGroupType

| Value | Description |
| --- | --- |
| `STUDENT` | Student accommodation product group |
| `SHORT_STAY` | Short-stay accommodation product group |
| `RESIDENTIAL` | Residential (long-term tenancy) product group |

<!-- INPUT_BLOCK_END -->

<!-- OUTPUT_BLOCK_START -->

## Output

| Field | Type | Description |
| --- | --- | --- |
| `content` | `ContentItem[]` | Array of content items returned by the tool - [ContentItem](#contentitem) |
| `isError` | `boolean` | Whether the tool execution resulted in an error |

### ContentItem

| Field | Type | Description |
| --- | --- | --- |
| `type` | `'text'` | Content type (currently only 'text' is supported) |
| `text` | `string` | The text content to display |

<!-- OUTPUT_BLOCK_END -->
