> Source: https://wexa.ai/docs/data-tables/get-table

# get-table

Read one Data Table's shape: its name, its columns with their types, and the connector behind it. No row data: use `query-table-rows` for that. Needs the `fabric:table.read` grant.

**Get a table**

**Wexa MCP server**

```bash
curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get-table","arguments":{"table_id":"6ab1944e7566f41b5c28e2eb"}}}'
```

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000195\",\"result\":{\"table_id\":\"6ab1944e7566f41b5c28e2eb\",\"table_name\":\"docs_fixture_orders\",\"connector_id\":\"6ab1944e7566f41b5c28e2ec\",\"trigger_count\":0,\"columns\":\"\\u2026\"}}"
    }
  ],
  "isError": false
}
```

**REST API**

```bash
curl -sS https://fabric.wexa.ai/v1/get-table \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"table_id":"6ab1944e7566f41b5c28e2eb"}'
```

```json
{
  "lifecycle_id": "qlc_000195",
  "result": {
    "table_id": "6ab1944e7566f41b5c28e2eb",
    "table_name": "docs_fixture_orders",
    "connector_id": "6ab1944e7566f41b5c28e2ec",
    "trigger_count": 0,
    "columns": "\u2026"
  }
}
```

**TypeScript SDK**

```ts
import { Fabric } from '@wexa-fabric/sdk'

const fabric = new Fabric()
const result = await fabric.getTable({
  table_id: '6ab1944e7566f41b5c28e2eb'
})
```

```ts
// result is the payload itself, with no `.result` to read
{
  table_id: '6ab1944e7566f41b5c28e2eb',
  table_name: 'docs_fixture_orders',
  connector_id: '6ab1944e7566f41b5c28e2ec',
  trigger_count: 0,
  columns: '…'
}
```

**Python SDK**

```python
from wexa import Fabric

fabric = Fabric()
out = fabric.get_table(table_id="6ab1944e7566f41b5c28e2eb")
```

```python
# out is the result, already unwrapped
{
    "table_id": "6ab1944e7566f41b5c28e2eb",
    "table_name": "docs_fixture_orders",
    "connector_id": "6ab1944e7566f41b5c28e2ec",
    "trigger_count": 0,
    "columns": "\u2026"
}
```

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `table_id` | string | Required | Table id from `list-tables`, a 24-character hex id. A table in this project. |

**Show full response**

A real response, captured from a live call to `get-table`:

`columns` came back populated and is shown as `…` here, because the real value runs to
thousands of characters. Read it from your own call rather than from this page.

**Result of get-table**

**REST API**

```json
{
  "lifecycle_id": "qlc_000195",
  "result": {
    "columns": "\u2026",
    "connector_id": "6ab1944e7566f41b5c28e2ec",
    "table_id": "6ab1944e7566f41b5c28e2eb",
    "table_name": "docs_fixture_orders",
    "trigger_count": 0
  }
}
```

**TypeScript SDK**

```ts
// the object you get back IS the result — there is no `.result` to read
{
  columns: '…',
  connector_id: '6ab1944e7566f41b5c28e2ec',
  table_id: '6ab1944e7566f41b5c28e2eb',
  table_name: 'docs_fixture_orders',
  trigger_count: 0
}

// The TS SDK names these camelCase — lifecycleId, traceId — where Python uses
// lifecycle_id and trace_id. Both are non-enumerable: readable, but omitted by
// Object.keys() and JSON.stringify(). `result.lifecycleId` here is undefined.
result.lifecycleId // 'qlc_000195'
```

**Python SDK**

```python
# a dict subclass; `result` is already unwrapped
{
 "columns": "\u2026",
 "connector_id": "6ab1944e7566f41b5c28e2ec",
 "table_id": "6ab1944e7566f41b5c28e2eb",
 "table_name": "docs_fixture_orders",
 "trigger_count": 0
}

out.lifecycle_id  # 'qlc_000195' — an attribute, not a key
```

Each entry of `columns` has this shape. This one is a column added as
`{"column_name": "notes", "column_type": "String"}`:

```json
{
  "array_type": null,
  "column_id": "6ab1968193a7cbd766d5cd74",
  "column_name": "notes",
  "column_type": "String",
  "default_value": null,
  "enum_options": null,
  "has_triggers": false,
  "object_fields": null
}
```

`columns` also lists the platform's own `_id`, `row_id` and `coworker_user_id`, whose `column_id` is
that name. A row for `insert-table-rows` or `update-table-row` may be keyed by `column_id` or
`column_name`; `query-table-rows` returns rows keyed by `column_id`.

**More details**

`columns` is shown as `…` in the example because the real value runs to thousands of characters. Read it from your own call; each entry has the shape shown under the full response.

`columns` lists every column, including the platform's own `_id`, `row_id` and `coworker_user_id`, whose `column_id` is that name. A row for `insert-table-rows` or `update-table-row` may be keyed by `column_id` or `column_name`; `query-table-rows` returns rows keyed by `column_id`.

Not marked consequential: it is audited lightly and the project's write gate never holds it.

Every tool call works the same way: [How every tool call works](/docs/sdks-and-apis/how-every-tool-call-works).
