# List Addresses

`lawmatics_list-addresses` · Lawmatics MCP tool · Addresses

List addresses from Lawmatics with optional pagination, filtering, and sorting. Prefer a filter when possible — the unfiltered firm-wide list is slow and may time out. Filter by addressable_id (the contact/matter/company the address belongs to), addressable_type, label, or created_at. Each row carries a `relationships` envelope with the owning `addressable` record as a to-one {id,type} pointer (a contact, company, matter, event, or the firm itself); use get-address for the full envelope including associated locations.

## Input

- **page** `integer` (> 0) — Page number (1-based)
- **filter** `object` — Optional single-field filter; one filter at a time
  - **field** `string` (required, enum: "addressable_id", "addressable_type", "label", "created_at") — Field to filter on: addressable_id (numeric id of the contact/matter/company the address belongs to), addressable_type (owning record type), label (address label, e.g. Home / Work), or created_at (date)
  - **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 addressable_id 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

- **addresses** `array` (required) — Addresses on this page of results
  - **[]** `object`
    - **id** `string` (required) — Unique ID of the address
    - **addressType** `string` (required) — Address label (e.g. Home, Work, Mailing)
    - **street** `string` (required) — Street address line 1
    - **street2** `string | null` (required) — Street address line 2 (apt, suite, etc.); null if unset
    - **city** `string | null` (required) — City; null if unset
    - **state** `string | null` (required) — State or province; null if unset
    - **postalCode** `string | null` (required) — Postal/ZIP code; null if unset
    - **country** `string | null` (required) — Country; null if unset
    - **fullAddress** `string | null` (required) — Full formatted single-line address; null if unset
    - **createdAt** `string | null` (required) — When the address was created, as an ISO 8601 timestamp; null if unknown
    - **updatedAt** `string | null` (required) — When the address was last updated, as an ISO 8601 timestamp; null if unknown
    - **relationships** `object` (required) — To-one JSON:API relationship pointers as {id,type} stubs. Not materialized — follow a pointer by calling that resource's own tool. List rows carry the owning `addressable` pointer only; use get-address for the full envelope incl. to-many locations.
      - **addressable** `object | null` (required) — Owning record pointer; null when unlinked. Polymorphic — the `type` is an open string (e.g. "contact", "company", "prospect" for a matter, "registerable_event", "firm"); resolve it by calling that record's own get/find tool
        - **id** `string` (required) — ID of the referenced Lawmatics record
        - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
- **pagination** `object | null` (required) — Pagination metadata from the API response; null when the endpoint returns no meta envelope
  - **totalPages** `number | null` (required) — Total number of pages available
  - **limitPerPage** `number | null` (required) — Maximum addresses returned per page; null if not reported
  - **totalEntries** `number | null` (required) — Total number of addresses across all pages
