# Create Folder

`lawmatics_create-folder` · Lawmatics MCP tool · Folders

Create a folder in Lawmatics for a matter or contact, optionally nested under an existing parent folder. Returns a `relationships` envelope of {id,type} pointers to the owning record (matter or contact), the parent folder, and the child folders and files it contains. Folder names must be unique within their parent folder — a duplicate name is rejected by the API. Slashes (/) in the name are replaced with colons (:).

## Input

- **name** `string` (required) — Folder name. Must be unique within the parent folder; Lawmatics replaces any slashes (/) in the name with colons (:)
- **matterId** `string` — ID of the matter to create this folder under
- **contactId** `string` — ID of the contact to create this folder under
- **parentFolderId** `string` — ID of an existing folder to nest the new folder under; omit to create at the top level

## Output

- **id** `string` (required) — Unique ID of the folder
- **name** `string` (required) — Folder name as stored (Lawmatics replaces slashes with colons)
- **createdAt** `string | null` (required) — When the folder was created, as an ISO 8601 timestamp; null if unknown
- **updatedAt** `string | null` (required) — When the folder 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 'prospect' -> get-matter, type 'contact' -> get-contact, type 'file' -> get-file, type 'folder' -> get-folder).
  - **documentable** `object | null` (required) — Owning record pointer — the matter/prospect or contact this folder belongs to; 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
  - **parentFolder** `object | null` (required) — Parent folder pointer when this folder is nested; null when it is at the top level
    - **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
  - **files** `array` (required) — File pointers contained in this folder; 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
  - **folders** `array` (required) — Child folder 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
