# Get File

`lawmatics_get-file` · Lawmatics MCP tool · Files

Fetch a single file's metadata from Lawmatics by ID, including a `relationships` envelope of {id,type} pointers to the owning record (documentable) and its folder / parent folder. Returns metadata only, not the file contents — use download-file to retrieve a short-lived download link for the bytes.

## Input

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

## Output

- **id** `string` (required) — Unique ID of the file
- **name** `string` (required) — Display name of the file as stored in Lawmatics
- **fileName** `string | null` (required) — Original uploaded file name (e.g. report.pdf); null if not reported
- **contentType** `string | null` (required) — MIME type of the file (e.g. application/pdf); null if not reported
- **size** `number | null` (required) — File size in bytes; null if not reported
- **createdAt** `string | null` (required) — When the file was created, as an ISO 8601 timestamp; null if unknown
- **updatedAt** `string | null` (required) — When the file 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 'folder' -> get-folder).
  - **documentable** `object | null` (required) — Owning record pointer (the matter/prospect, contact, company, or firm this file belongs to); null when the file has no owner
    - **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
  - **folder** `object | null` (required) — Folder the file lives in; null when at the root / unfiled
    - **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; null when the file is not nested under a folder
    - **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
