My workspace's database
connections_databaseThe workspace's own Postgres database for its website or app (tables, rows, SQL), with vector, pg_trgm, pgcrypto and uuid-ossp installed. Call this when the member wants to store data for a project, create tables, save or read rows, or run a migration. Runs in the workspace this chat is pinned to. Actions: create: make the database (safe to repeat; never changes existing data). status: whether it is ready, its size and its limits. tables: every table with an estimated row count and its columns. sql: run ONE statement in sql (use $1, $2 with params for values), or several in order in statements as one transaction (all succeed or none do), as the workspace's own login; reads return up to 1000 rows and 1 MB and say truncated when cut, a statement stops after 15 seconds, and a migration batch holds at most 50 statements. It cannot reach any other database and never returns a password. Create tables with plain DDL, e.g. create table if not exists notes (id uuid primary key default gen_random_uuid(), body text). audit: the newest admin actions on this database (when it was created, frozen, thawed or erased, and each schema-changing SQL call, with who did it and when); the workspace owner only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | sql: one SQL statement. Use $1, $2... for values and pass them in params. | |
| limit | No | audit: how many of the newest entries to return (default 50, at most 200). | |
| action | Yes | What to do. | |
| params | No | sql: values for $1, $2... in `sql`, sent as text; Postgres converts them to the column types. | |
| person | No | Linked person to run this call as (first name). Omit to run as the connection's holder. | |
| dry_run | No | Preview only. | |
| project | No | Workspace to run this call in (id or name). | |
| statements | No | sql: several statements run in order in one transaction (a migration). Use this or `sql`, not both. |