database_read_containers
This page answers what database_read_containers returns, what it takes, and when it is offered.
Purpose
database_read_containers reads the containers of one database: each container's name, partition
key and retention as the workspace declares them, and what the cloud says of it. It does not read
the records inside a container; to see what a container holds, use call_api with a warm query
draft and Sample. It changes nothing.
It is a contributed tool: the database kind declares it, the platform's review gives it the
effect read, and the OpenX MCP Server runs it. See
Contributing to Thinky.
When it is offered
- By its kind. The server lists it while the workspace has the database kind. The listing names
the kind in its
_meta:openx/azi-kindisdatabase,openx/azi-effectisreadandopenx/azi-loadisopen-panel. - In Thinky. Thinky loads it only while a Database panel is open. With no Database panel open,
Thinky finds it with
search_toolswhen you ask for it by name.
Inputs
| Input | Type | Meaning |
|---|---|---|
databaseLookup | text | Required. The lookup of the database, as an open Database panel shares it. |
Example
{ "databaseLookup": "line-data" }
The answer is { DatabaseLookup, Containers }. Each container has:
| Field | Meaning |
|---|---|
Lookup | The container's lookup in the workspace. |
TableName | The container's name in the database. |
PartitionKeyPath | The partition key, for example /DeviceId. |
PartitionKeyType | The type of the partition key's value, when it is not text: number or boolean. |
TTLSeconds | The retention: how long a record is kept, in seconds. Absent means records are never expired. |
Inventory | What the cloud says of the container, as retrieve_inventory gives it, for example Exists. |
The containers are limited exactly as get_workspace limits them for you. A database with no
containers answers an empty list.
Inventory is never empty when it is not known. When the cloud could not be asked, or did not
answer for a container, Inventory is Known: false with a Reason and a Remedy, for example
NOT_LISTED when the inventory did not list that container.
Errors
DATABASE_LOOKUP_REQUIRED(400): nodatabaseLookupwas given. Pass the lookup an open Database panel shares.DATABASE_NOT_FOUND(404): there is no database with that lookup that you can read. Callget_workspacewithkinds: ["Databases"]for the databases you can read.