# Get Company

`lawmatics_get-company` · Lawmatics MCP tool · Companies

Fetch a single company from Lawmatics by ID, including name, contact details, addresses, custom fields, and a `relationships` envelope of {id,type} pointers to related records (primary contact, contacts, prospects, tags, emails, phone numbers, addresses, notes, and the creating user).

## Input

- **companyId** `string` (required, pattern: ^\d+$) — ID of the company to fetch; a numeric string

## Output

- **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
- **customFields** `array` (required) — Account-defined custom fields on the company; empty array if none
  - **[]** `object`
    - **id** `string` (required) — Custom field definition ID, as a numeric string
    - **name** `string | null` (required) — Custom field display name; null if unset
    - **fieldType** `string | null` (required) — Custom field data type (e.g. text, date, select); null if unset
    - **value** `any` (required) — Raw custom field value; type varies by `fieldType`
    - **formattedValue** `any` (required) — Display-formatted custom field value; type varies by `fieldType`
- **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) — JSON:API relationship pointers to related records as {id,type} stubs. Not materialized — follow a pointer by calling that resource's own get/find tool (e.g. type 'contact' -> get-contact, type 'user' -> get-user, type 'address' -> get-address).
  - **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
  - **contacts** `array` (required) — Contact pointers; empty if none
    - **[]** `object`
      - **id** `string` (required) — ID of the referenced Lawmatics record
      - **type** `string` (required) — JSON:API record class of the reference; resolve it by calling that resource's own tool
  - **prospects** `array` (required) — Prospect (matter) pointers; empty if none
    - **[]** `object`
      - **id** `string` (required) — ID of the referenced Lawmatics record
      - **type** `string` (required) — JSON:API record class of the reference; resolve it by calling that resource's own tool
  - **tags** `array` (required) — Tag pointers; empty if none
    - **[]** `object`
      - **id** `string` (required) — ID of the referenced Lawmatics record
      - **type** `string` (required) — JSON:API record class of the reference; resolve it by calling that resource's own tool
  - **emails** `array` (required) — Email-address pointers; empty if none
    - **[]** `object`
      - **id** `string` (required) — ID of the referenced Lawmatics record
      - **type** `string` (required) — JSON:API record class of the reference; resolve it by calling that resource's own tool
  - **phoneNumbers** `array` (required) — Phone-number pointers; empty if none
    - **[]** `object`
      - **id** `string` (required) — ID of the referenced Lawmatics record
      - **type** `string` (required) — JSON:API record class of the reference; resolve it by calling that resource's own tool
  - **addresses** `array` (required) — Address pointers; empty if none. Distinct from the `addresses` attribute above, which carries the full nested address objects
    - **[]** `object`
      - **id** `string` (required) — ID of the referenced Lawmatics record
      - **type** `string` (required) — JSON:API record class of the reference; resolve it by calling that resource's own tool
  - **notes** `array` (required) — Note pointers; empty if none
    - **[]** `object`
      - **id** `string` (required) — ID of the referenced Lawmatics record
      - **type** `string` (required) — JSON:API record class of the reference; resolve it by calling that resource's own tool
