# Update Collection

`lawmatics_update-collection` · Lawmatics MCP tool · Collections

Update an existing Collection in Lawmatics by ID: rename the collection, modify existing custom fields by id, or add new custom field definitions. Fields not referenced in the request are left unchanged.

## Input

- **collectionId** `string` (required, pattern: ^\d+$) — ID of the collection to update; a numeric string
- **name** `string` — New name for the collection
- **customFields** `array` — Custom field entries to modify (with id) or add (without id); fields not referenced are left unchanged
  - **[]** `object`
    - **id** `string` (pattern: ^\d+$) — ID of an existing custom field to modify; omit to add a new field to the collection
    - **name** `string` — Display name of the custom field
    - **fieldType** `string` (enum: "integer", "boolean", "string", "text", "currency", "date", "time", "datetime", "list", "multi_picklist") — Type of the field; required when adding a new field
    - **listOptions** `array` — Selectable options; only for list and multi_picklist field types
      - **[]** `object`
        - **name** `string` (required) — Display name of the selectable option

## Output

- **id** `string` (required) — Unique ID of the collection
- **name** `string` (required) — Name of the collection
- **customFields** `array` (required) — Custom field definitions that make up the schema of this collection's items
  - **[]** `object`
    - **id** `string` (required) — Unique ID of the custom field definition
    - **name** `string` (required) — Display name of the custom field
    - **fieldType** `string` (required) — Type of the field (e.g. text, currency, list, multi_picklist, string, date)
    - **visibility** `string` (required) — Visibility setting of the field as reported by Lawmatics (e.g. "default")
    - **listOptions** `array` — Selectable options; present only for list and multi_picklist field types
      - **[]** `object`
        - **id** `string` (required) — Unique ID of the list option
        - **name** `string` (required) — Display name of the selectable option
    - **createdAt** `string` (required) — When the custom field was created, as an ISO 8601 timestamp
    - **updatedAt** `string` (required) — When the custom field was last updated, as an ISO 8601 timestamp
- **createdAt** `string` (required) — When the collection was created, as an ISO 8601 timestamp
- **updatedAt** `string` (required) — When the collection was last updated, as an ISO 8601 timestamp
