akb_create_table
Create structured data tables with typed columns, indexes, and unique keys in a vault or collection, returning a canonical URI for the new table.
Instructions
Create a structured data table in a vault. The response carries the canonical uri — akb://{vault}/coll/{collection}/table/{name} when stored under a collection, or akb://{vault}/table/{name} at the vault root. Tables live alongside documents inside collections and follow the same permissions. Define columns with name and type (text, number, boolean, date, json). Optional collection (e.g. 'sessions/learnings') groups the table under that collection so it appears beside the documents and files there in akb_browse; omit for vault root.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Table name (unique within the vault) | |
| vault | No | Target vault name. Required unless `parent` is given. | |
| parent | No | Parent location as a canonical URI — `akb://{vault}` for the vault root, `akb://{vault}/coll/{path}` for a collection. When given, the table is created there and `vault`/`collection` are derived from the URI. | |
| columns | Yes | Column definitions | |
| indexes | No | Declarative lookup (btree) indexes. Each item is {name?, columns}. A column is a bare string or {name, order} where order is 'asc' (default) or 'desc'. Unique indexes are expressed via `unique_keys`, not here. | |
| collection | No | Collection path (e.g. 'specs' or 'sessions/learnings'). Omit for vault root. Ignored when `parent` is given. | |
| description | No | ||
| unique_keys | No | Declarative UNIQUE keys. Each item is {name?, columns}. `columns` is a list of existing column names (single or composite). `name` is optional — when omitted AKB generates a deterministic, stable name. Use this (not `indexes`) for unique indexes. |