# List Collection Items

`lawmatics_list-collection-items` · Lawmatics MCP tool · Collection Items

List collection items from Lawmatics with optional pagination, filtering, and sorting. Filter by the parent collection id or the attached matter id to find the rows of one Collection or matter.

## Input

- **page** `integer` (> 0) — Page number (1-based)
- **filter** `object` — Optional single-field filter; one filter at a time
  - **field** `string` (required, enum: "collection_id", "contactable_id", "contactable_type", "created_at", "updated_at") — Field to filter on: collection_id (numeric id of the parent Collection), contactable_id (numeric id of the matter the item is attached to), contactable_type (always Prospect = matter; the API rejects other record types on create), created_at, or updated_at (dates)
  - **operator** `string` (enum: "=", "!=", "<", "<=", ">", ">=", "like", "ilike", "null", "not_null") — Comparison operator. Omit to use the Lawmatics per-field default (= for ids/dates, ilike for strings). Use = for id fields and a range operator (e.g. >) for created_at
  - **value** `string` (required) — Value to compare against (ignored for null / not_null operators)
- **sortBy** `string` (enum: "id", "created_at", "updated_at") — Column to sort by
- **sortOrder** `string` (enum: "asc", "desc") — Sort direction; ascending or descending

## Output

- **collectionItems** `array` (required) — Collection items on this page of results
  - **[]** `object`
    - **id** `string` (required) — Unique ID of the collection item
    - **collectionId** `string` (required) — ID of the parent Collection this item belongs to, as a numeric string
    - **ownerType** `string` (required) — Type of the record this item is attached to as returned by the API — always "Prospect" (a matter) today; the live API rejects other record types on create
    - **ownerId** `string` (required) — ID of the record this item is attached to, as a numeric string
    - **customFieldValues** `array` (required) — Cell values stored on this item, one per Collection custom field; empty if none
      - **[]** `object`
        - **id** `string` (required) — ID of this stored cell value row, as a numeric string
        - **customFieldId** `string` (required) — ID of the Collection custom field definition this value belongs to, as a numeric string
        - **name** `string | null` (required) — Custom field display name; null if not reported
        - **fieldType** `string | null` (required) — Custom field data type (e.g. text, date, select); null if not reported
        - **value** `any` (required) — Raw stored cell value; type varies by fieldType; null if unset
        - **formattedValue** `any` (required) — Display-formatted cell value; type varies by fieldType; null if not reported
    - **createdAt** `string` (required) — When the item was created, as an ISO 8601 timestamp
    - **updatedAt** `string` (required) — When the item was last updated, as an ISO 8601 timestamp
- **pagination** `object` (required) — Pagination metadata derived from the API `meta` envelope
  - **totalPages** `number | null` (required) — Total number of pages available; null if not reported
  - **limitPerPage** `number | null` (required) — Maximum collection items returned per page; null if not reported
  - **totalEntries** `number | null` (required) — Total number of collection items across all pages; null if not reported
