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

# create_data_table

> Create a local data table — the structure records are then imported into. The table is created empty; add columns and load rows separately.

Create a local data table — the structure records are then imported into.

A data table is the root most of a compensation plan hangs off: fields, record
reports, scopes and quotas all point at one. This creates the empty structure
with its name field; add its other columns with
[`create_data_table_field`](/mcp_documentation/tools/create_data_table_field),
and load its rows by Excel import from the Qobra web app.

The table matches each record's owner on the user's email address. Tables
synced from an integration are created from that integration's settings
instead, not here.

Available only where the Qobra write tools beta is enabled. Every write is
recorded in the audit trail as the `Qobra MCP` agent.

## Parameters

<Accordion title="Body" defaultOpen>
  <ParamField body="name" type="string" required>
    Display name of the table, as people will read it in Qobra — 'Deals',
    'Subscriptions', 'Invoices'.
  </ParamField>

  <ParamField body="key" type="string">
    The table's stable key: the identifier the public API addresses it by,
    distinct from the display name. Lowercase and underscore-separated, and
    unique across the company. Omit to derive it from the name ('Closed Deals'
    gives 'closed\_deals').
  </ParamField>

  <ParamField body="id_field_label" type="string">
    Label of the column holding each record's unique identifier in the source
    data. Defaults to 'Record ID'.
  </ParamField>

  <ParamField body="name_field_label" type="string">
    Label of the column holding each record's name — what a record is listed
    as throughout Qobra. Defaults to 'Name'.
  </ParamField>
</Accordion>

## Response

<Accordion title="Body" defaultOpen>
  <ResponseField name="data_table" type="object">
    The data table as it now exists — the same row list\_data\_tables returns,
    so the id can be reused straight away.

    <Expandable title="object properties">
      <ResponseField name="id" type="string" />

      <ResponseField name="resource_url" type="string">
        Deep link to open this data table in the Qobra web app.
      </ResponseField>

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

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

      <ResponseField name="source" type="string">
        One of: `local`, `integration`. Always `local` for a table created
        here.
      </ResponseField>

      <ResponseField name="integration" type="object">
        Null — a table created here has no source integration.
      </ResponseField>

      <ResponseField name="views" type="object[]">
        Empty — a table's default view is minted lazily on the first read of
        its views.
      </ResponseField>

      <ResponseField name="fields" type="object[]">
        The columns on the table. A just-created table has only its name
        field.

        <Expandable title="object properties">
          <ResponseField name="name" type="string" />

          <ResponseField name="api_key" type="string">
            Stable technical key for this field in Qobra's public API.
          </ResponseField>

          <ResponseField name="type" type="string">
            Field data type. One of: `float`, `amount`, `percentage`,
            `string`, `picklist`, `multipicklist`, `bool`, `date`, `user`,
            `object`, `group`, `record_status`.
          </ResponseField>

          <ResponseField name="linked_to" type="object">
            When type is object, the table this field points to; null
            otherwise.

            <Expandable title="object properties">
              <ResponseField name="id" type="string" />

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