# List Companies

`lawmatics_list-companies` · Lawmatics MCP tool · Companies

List companies from Lawmatics with optional pagination. Rows carry name, contact details, addresses, and a `relationships` envelope of to-one {id,type} pointers (primary contact, creating user); use get-company for the full envelope including to-many relationships.

## Input

- **page** `integer` (> 0) — Page number (1-based)

## Output

- **companies** `array` (required) — Companies on this page of results
  - **[]** `object`
    - **id** `string` (required) — Lawmatics company ID
    - **name** `string | null` (required) — Company name; null if unset
    - **email** `string | null` (required) — Primary email address; null if unset
    - **address** `string | null` (required) — Computed, formatted full address string; read-only; null if unset
    - **city** `string | null` (required) — Primary address city; null if unset
    - **state** `string | null` (required) — Primary address state/province; null if unset
    - **postalCode** `string | null` (required) — Primary address ZIP/postal code; null if unset
    - **country** `string | null` (required) — Primary address country; null if unset
    - **phoneNumber** `string | null` (required) — Primary phone number as stored; null if unset
    - **addresses** `array` (required) — All addresses associated with the company; empty array if none
      - **[]** `object`
        - **id** `number` (required) — Address ID
        - **street** `string | null` (required) — Street address line 1; null if unset
        - **street2** `string | null` (required) — Street address line 2; null if unset
        - **city** `string | null` (required) — Address city; null if unset
        - **state** `string | null` (required) — Address state/province; null if unset
        - **postalCode** `string | null` (required) — Address ZIP/postal code; null if unset
        - **country** `string | null` (required) — Address country; null if unset
        - **label** `string | null` (required) — Address label (e.g. Primary, Home, Work); 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
    - **createdAt** `string | null` (required) — When the company was created, as an ISO 8601 timestamp; null if unknown
    - **updatedAt** `string | null` (required) — When the company 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 to-one pointers only; use get-company for the full envelope incl. to-many (contacts, prospects, tags, emails, phone numbers, addresses, notes).
      - **primaryContact** `object | null` (required) — Primary-contact pointer (live `type` "primary_contact"); null when unset
        - **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
      - **createdBy** `object | null` (required) — Creating user pointer; null when unset
        - **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; null if not reported
  - **limitPerPage** `number | null` (required) — Maximum companies returned per page; null if not reported
  - **totalEntries** `number | null` (required) — Total number of companies across all pages; null if not reported
