TablesWriteDo not retry automatically

Create a relation between tables

create_table_relation

Link two tables. Creates the relation field here and, when `reciprocal` is given, the reverse field on the target — one operation, because a half-created relation is a column pointing at nothing. Once it exists, link rows with link_table_rows and summarise across it with a Lookup / Rollup / Count field (add_table_field).

Parameters

ParameterTypeRequiredDescription
tableIdstringrequiredTable the relation is added to
targetTableIdstringrequiredTable it points at — the same table for a self-relation
labelstringrequiredField name on this table
cardinality"one" | "many"optionalone = a row links to at most one target row; many = several
reciprocalobjectoptionalCreate the reverse field on the target table too. Omit for a one-way relation.
previewFieldIdsstring[]optionalTarget field ids shown beside the primary value on a chip
descriptionstringoptionalInput for description.
iconstringoptionalInput for icon.
expectedSchemaVersionintegeroptionalAssert the table schema version you last read. Omit to let the call read it — the write still fails if someone changes the schema in between.

Example call

The tool call an MCP client sends (required arguments shown with placeholder values).

{
"tool": "create_table_relation",
"arguments": {
"tableId": "tableId_123",
"targetTableId": "targetTableId_123",
"label": "value"
}
}

Use this tool in

Related Tables tools