Skip to Content

Database

Read from and write to your project’s Data Vault tables. These tools use your project context automatically — no connection setup — but they act on tables that must already exist.

⚠️

Schema changes and bulk data generation pause for approval (built-in HIL): db_create_table, db_create_related_tables, db_modify_table (critical risk) and db_generate_data, db_generate_multi_table_data (high risk). A person must approve before they run.

db_query

Run a read-only SELECT — parameterized, security-validated, row-limited. Category: Data Pull · Setup: needs tables. Enforces row-level security in the calling user’s context.

  • Inputs: query (SELECT with $1,$2 params), params, max_rows (default 100), environment.
db_query tool — Overview tab
db_query tool — Test tab returning rows

db_get_schema

List tables, columns, types, and relationships — call before querying. Category: Data Pull · Setup: none (works on empty schemas).

  • Inputs: format (text/json), include_row_counts, table_filter, environment.
db_get_schema tool — Overview tab
db_get_schema tool — Test tab

db_preview_table_data

Preview sample rows from one or more tables. Category: Data Pull · Setup: needs tables.

  • Inputs: tables (1–10 names), limit (default 5).
db_preview_table_data tool — Overview tab
db_preview_table_data tool — Test tab

db_create_table

Create a table (generates DDL). Category: Action · HIL approval · Setup: none.

  • Inputs: table_name (snake_case), columns, id_config, include_audit_columns, indexes, environment.
db_create_table tool — Overview tab
db_create_table tool — Test tab

Create multiple tables with foreign keys, ordered by dependencies. Category: Action · HIL approval.

  • Inputs: tables (1–20, each with columns + relationships), include_audit_columns, environment.
db_create_related_tables tool — Overview tab
db_create_related_tables tool — Test tab

db_modify_table

Add/drop/rename columns or indexes. Category: Action · HIL approval · Setup: needs table.

  • Inputs: table_name, operations (ADD_COLUMN, DROP_COLUMN, MODIFY_COLUMN, RENAME_COLUMN, ADD_INDEX, DROP_INDEX), environment.
db_modify_table tool — Overview tab
db_modify_table tool — Test tab

db_generate_data

Generate realistic sample data for a table using Faker (no model/credits). Category: Action · HIL approval · Setup: needs table.

  • Inputs: table_name, row_count (1–5000), generation_hints, seed, preview_only.
db_generate_data tool — Overview tab
db_generate_data tool — Test tab

db_generate_multi_table_data

Generate FK-aware sample data across related tables (Faker). Category: Action · HIL approval.

  • Inputs: tables (1–20, each with name + rows + hints), seed.
db_generate_multi_table_data tool — Overview tab
db_generate_multi_table_data tool — Test tab

agent_db_write

The AI-Agent path for INSERT/UPDATE/DELETE. Category: Action · Setup: needs table. Blocks UPDATE/DELETE without a WHERE; approval is enforced by the agent’s HIL gate.

  • Inputs: query (raw DML — type + table auto-extracted), environment.
agent_db_write tool — Overview tab
agent_db_write tool — Test tab

Deprecated

ℹ️

These still exist but are superseded — avoid for new work (no screenshots):

  • db_get_schema_metadata — older schema reader; use db_get_schema instead.
  • db_write_query — Data-Assistant-only DML; not selectable by AI Agents. Use agent_db_write.