data_create_datastore
Create a new datastore (PG-backed), optionally WITH its typed schema.
⚠️ A new table is born with NO column, and a write into a column the schema does not declare is REFUSED (unknown_column): its first write is refused until columns are declared. To create a table you are going to FILL, pass schema — the SAME object as data_set_schema ({"fields": [{"key": …, "type": …}], "key"?: …}, same closed vocabulary, same validation): the table is born with it, in ONE atomic call. If the schema is refused, the table is NOT created. That is the normal way to create a table you fill; without schema it is born free, and data_patch_schema(fields=[…]) declares columns later.
The table is PRIVATE: it belongs to you, and no one else can read it — not the other members of your org, not its admins. That is the default and it is never implicit (ADR 0068).
⚠️ It used to be owned by your ACTIVE ORG, readable by every member. To share
a table with your org or a team, say so: the REST route takes
owner: {type: "org"|"group", id: N}. Tables created before 2026-09-04 keep
the owner they have.
⚠️ _org= does NOT change the owner. It decides which org you read and
write under — never who owns what you create. Create a table under _org=N
without an owner and it is still YOURS: every later call of yours keeps
working, so nothing looks wrong. It shows up at the second agent, or at the
colleague who cannot find the table and concludes it does not exist. The
reply tells you the owner, and warns you in exactly that case.
A personal table is LISTED in your PERSONAL org, whatever org you create it
under — data_list_datastores from any other org does not show it. Its number
(ns_id) opens it from anywhere.
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": {
"datastore": "<datastore>"
},
"name": "data_create_datastore"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _org | No | Org (id) de CET APPEL. `oto_list_orgs()`. | |
| _group | No | Équipe (id) de CET APPEL, sous son org parente. | |
| schema | No | optional — the table's schema, the SAME object as `data_set_schema(schema=…)`. Omitted (or null) = a free table. | |
| _run_id | No | OBLIGATOIRE à chaque appel dès `run_start` ou `data_claim_next` : sans lui, l'écriture sur une ligne réservée est refusée. Hérité seulement si le serveur tient un run actif — n'y compte pas. | |
| _project | No | Projet (id) de CET APPEL — jeton PRIMAIRE. `oto_project(op='list')`. | |
| datastore | Yes | kebab-case identifier, unique per owner (e.g. `timetrack`). |