describe_table
Describe a table: its columns, links, capabilities and, on request, sample rows.
A columns[] description is prose the modeler wrote: it is the modeler's intent and outranks your reading of the name.
A categorical column carries categories: [{id, label}] in user order; its length is the exact cardinality. In run_sql a categorical cell is a LIST of ids: filter with array_has("col-…", 2) (never = or IN), and count per option with summarize_column or UNNEST (a GROUP BY groups whole cells). A cell may hold several options. Writes take LABELS, not ids, and replace the cell's options; update_categories edits the options.
include_sample_rows: true (with sample_rows_n, 1..=5, default 3) adds sample_rows. Each row carries a row_id: the handle edit_rows takes, and _row_id in run_sql, where you select it for rows not sampled. Rows come in storage order (an edited row moves to the end), so find specific rows with run_sql. Attachment cells show file NAMES; the column carries app_url for the person.
links lists declared TableLinks. A kind "membership" means the scalar occurs in the other side's list_string column, and the entry carries the exact join_predicate to paste. from_columns/to_columns pair by position; part of a composite key is a looser join that multiplies rows. Every to_table_id is readable through this connection.
datasets names the datasets holding this table.
capabilities says what you may do. A false may mean no permission OR a read-only table: connector-fed (Google Sheet, Postgres, Supabase, bucket, local SQLite) or imported. Do not retry. A connector table is fixed at its source and the next sync brings it in; a copy (create_table with sql) is editable but no longer syncs.
recipe appears only on a recipe RESULT: recipe_id, version, args and picks (in run_recipe shape), lens and can_view_recipe. describe_recipe shows the definition, run_recipe asks again, materialize_recipe refreshes the table. A result takes no edits, links or shares.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"table_id": "<table_id>"
},
"name": "describe_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_id | Yes | Table id (`tab-…`) from `list_tables` / `search`. | |
| sample_rows_n | No | Sample rows to return, 1..=5. Default 3. | |
| include_sample_rows | No | Add `sample_rows` (see the tool description). Costs one extra scan. |