> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gc.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get vault documents

> Read a vault's table: one row per document, with the value GC AI extracted for every column.

<Note>
  The MCP server is in public beta. It is open to use and still being refined, so tools and behavior may change.
</Note>

<Info>
  **Tool** `get_vault_documents` · **Behavior** Read-only
</Info>

Read a vault's table: one row per document, with the value GC AI extracted for every column. This is the tool for questions the table can answer directly, such as which contracts expire this quarter, which name a counterparty, or which are missing a value. Narrow with `filters` and `sort` rather than paging everything. `values` is keyed by column `field_key`; read the keys, labels, and types from `get_vault_columns` first. A value is a string, and structured columns carry JSON in it: a currency holds `{"amount","currency"}`, a date holds `YYYY-MM-DD`, a multi-select holds a JSON array. `null` means the scan found no value. A document appears here once its first scan writes values, a few minutes after upload, so a row missing right after `upload_file` is not lost. To answer from the text inside the documents rather than the extracted columns, use `ask_gcai` with this vault instead.

## Input parameters

<ParamField body="vault_id" type="string (uuid)" required>
  The vault to read, from `get_vaults`.
</ParamField>

<ParamField body="document_id" type="string (uuid)">
  Fetch one row by its `document_id`. Provide either `document_id` or a list query (`q`/`filters`/`sort`/`cursor`), not both.
</ParamField>

<ParamField body="q" type="string">
  Case-insensitive substring of the document name. This searches names only, not the text inside the documents. To answer a question from the contents, use `ask_gcai` with this `vault_id` instead.
</ParamField>

<ParamField body="filters" type="object[]">
  Rules combined with AND. A rule naming an unknown column, or an operator that column cannot use, is an error rather than a rule that is quietly dropped, so a count is never silently wrong.

  <Expandable title="properties">
    <ParamField body="field_key" type="string" required>
      Column key, from `get_vault_columns`.
    </ParamField>

    <ParamField body="operator" type="string" required>
      One of: contains, equals, in, date\_range, is\_before, is\_after, number\_range, boolean, list\_length, equals\_only, party\_contains, not\_contains, not\_equals, is\_empty, is\_not\_empty.
    </ParamField>

    <ParamField body="value" type="any | null">
      Shape depends on the operator: a string for `contains`, an array for `in`, `{from,to}` for `date_range`, `{min,max}` for `number_range`, omitted for `is_empty`/`is_not_empty`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="sort" type="object">
  Sort by a column key, or by `fileName`, `extractedAt`, or `sourceName`.

  <Expandable title="properties">
    <ParamField body="field" type="string" required />

    <ParamField body="direction" type="'asc' | 'desc'" required />
  </Expandable>
</ParamField>

<ParamField body="cursor" type="string">
  Opaque pagination cursor from a previous response's `next_cursor`. Omit for the first page; repeat any filters (e.g. `q`) alongside it.
</ParamField>

<ParamField body="limit" type="integer">
  Max items to return (default 25, max 100). Defaults to `25`.
</ParamField>

## Response

<ResponseField name="documents" type="object[]">
  <Expandable title="properties">
    <ResponseField name="document_id" type="string" />

    <ResponseField name="file_id" type="string" />

    <ResponseField name="name" type="string" />

    <ResponseField name="file_name" type="string" />

    <ResponseField name="source_name" type="string | null" />

    <ResponseField name="source_provider" type="string | null" />

    <ResponseField name="extracted_at" type="string | null" />

    <ResponseField name="is_extraction_active" type="boolean" />

    <ResponseField name="deleted_at" type="string | null" />

    <ResponseField name="removed_as_duplicate_at" type="string | null" />

    <ResponseField name="values" type="object" />
  </Expandable>
</ResponseField>

<ResponseField name="total_count" type="number | null" />

<ResponseField name="next_cursor" type="string | null" />
