Docs menu

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-kind is database, openx/azi-effect is read and openx/azi-load is open-panel.
  • In Thinky. Thinky loads it only while a Database panel is open. With no Database panel open, Thinky finds it with search_tools when you ask for it by name.

Inputs

InputTypeMeaning
databaseLookuptextRequired. The lookup of the database, as an open Database panel shares it.

Example

{ "databaseLookup": "line-data" }

The answer is { DatabaseLookup, Containers }. Each container has:

FieldMeaning
LookupThe container's lookup in the workspace.
TableNameThe container's name in the database.
PartitionKeyPathThe partition key, for example /DeviceId.
PartitionKeyTypeThe type of the partition key's value, when it is not text: number or boolean.
TTLSecondsThe retention: how long a record is kept, in seconds. Absent means records are never expired.
InventoryWhat 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): no databaseLookup was given. Pass the lookup an open Database panel shares.
  • DATABASE_NOT_FOUND (404): there is no database with that lookup that you can read. Call get_workspace with kinds: ["Databases"] for the databases you can read.
On this page