create_table
Create a table in a model. name is required: ask if the user gave none. Declare columns as name + data_type (as list_column_types spells it). A categorical column takes its labels in categories. Columns may also carry description, unit (a uri from search_units) and nullable: false (required); the table its description, unique_keys and checks (columns by name). FROM SQL: pass sql, a DataFusion SQL SELECT over this model's own tables in ids as run_sql takes them, every output column aliased: the alias is the column's name. Its rows fill the table once, at any size; it stays editable, nothing re-runs it, and the SQL is kept as its origin. Then columns is optional: each names an alias to give it categories, a description, a unit or nullable, and a data_type only to make it categorical; a value its categories do not name refuses the create (dry_run lists them first). Keys and checks follow with set_table_metadata. Cleaning an import keeps the original. Reading a recipe RESULT copies it: only a space manager may, and only if they could share every table it reads. A refused column is named and nothing is made.
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": {
"model_id": "<model_id>",
"name": "<name>"
},
"name": "create_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | A SELECT over this model's tables, every output column aliased (see the tool description). | |
| name | Yes | Table name, required and not blank: what everyone sees on the canvas. | |
| checks | No | The table's checks, naming columns by their `name` above. Not with `sql`. | |
| columns | No | The table's columns (name + type each). Without `sql`, at least one: rows are keyed by `column_id`. With `sql`, optional, and each names an output alias to give its type, categories, description, unit or `nullable`. | |
| dry_run | No | With `sql`: count rows and list values outside `categories`; create nothing. | |
| model_id | Yes | The model to create the table in. | |
| description | No | What the table holds: what one row is. | |
| unique_keys | No | The table's unique keys, naming columns by their `name` above. Not with `sql`. | |
| idempotency_key | No | Stable unique string: a repeat with the same key returns the first call's table. |