ROUA: read-only database accounts
v0.5.0Create and audit read-only database accounts for AI agents: PostgreSQL, MySQL, SQL Server and more.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_engines List ROUA databases
List the databases ROUA supports, how well each is tested, and how read-only access works on each.
audit_script Audit script for an existing account
Write a read-only audit script that checks whether an existing database account is really read-only (write privileges, roles, ownership, secret columns, expiry). Returns the script text and how to run it. Connects to nothing.
| Parameter | Type | Description |
|---|---|---|
engine * | string | |
name * | string | Account, role, login or user name to audit. |
database | string | SQL Server database, MongoDB auth database or BigQuery project id. |
host | string | MySQL/MariaDB host part of 'user'@'host' (default %). |
location | string | BigQuery location (default US). |
role | string | Snowflake role to inspect (default NAME_READ). |
generate_account_scripts Generate ROUA account scripts
Generate the scripts that create a read-only ROUA account (setup, audit, revoke, drop) and write them to a new folder. The password or private key is written to a file in that folder with owner-only permissions and is never returned. Nothing is run against any database: a human runs setup as an administrator.
| Parameter | Type | Description |
|---|---|---|
engine * | string | |
expires_at * | string | ISO 8601 UTC, within the profile's maximum lifetime. |
name * | string | Account name: lowercase, 3-63 chars, e.g. roua_agent_docs. |
output_dir * | string | Absolute path of a new or empty folder to write the scripts to. |
owner * | string | Accountable person (email). |
profile * | string | |
purpose * | string | |
allowed_sources | array | |
columns_deny | array | schema.table.column to hide besides detected secrets. |
database | string | Database, project id (BigQuery) as the engine needs. |
exclude | array | schema.table patterns to leave out. |
level | string | PostgreSQL only (default from the profile). |
location | string | BigQuery location. |
max_connections | integer | |
mode | string | Other engines: everything in scope minus exclusions (L2), only listed objects (L1), or structure only (L0, where the engine supports it). |
objects | array | Listed mode / PostgreSQL L1: schema.table (collections for MongoDB, key patterns for Redis). |
password_env | string | Name of an environment variable of this server holding the password. Default: generate one. |
schemas | array | Schemas, databases (MySQL), owners (Oracle) or datasets (BigQuery). |
statement_timeout_s | integer | |
warehouse | string | Snowflake warehouse. |
audit_postgres_role Audit a PostgreSQL role (live)
Connect with ADMIN_DATABASE_URL (from this server's environment) and audit a PostgreSQL role: every path to write, secret columns it can read, expiry and limits. Only reads catalog views; changes nothing.
| Parameter | Type | Description |
|---|---|---|
role * | string | Role name to audit. |
preview_scope Preview an account's scope against a schema
Before generating anything, show exactly what an account would read in a real schema: which tables, which columns stay hidden and why, and which schemas, listed names, exclusions or hidden-column entries match nothing (typos). Pass the output of the discovery script (JSON, CSV or psql table). Connects to nothing.
| Parameter | Type | Description |
|---|---|---|
engine * | string | |
schema * | string | Output of the discovery script (discover.sql / discover.js) or roua discover: JSON, CSV/TSV with schema,table,column headers, or psql table output. |
columns_allow | array | |
columns_deny | array | |
database | string | MongoDB database. |
exclude | array | |
include | array | |
level | string | PostgreSQL: L0 to L5. |
mode | string | Other engines. |
objects | array | Listed objects (L1, or analytics views for PostgreSQL L3). |
schemas | array |
discover_postgres_schema Read a PostgreSQL schema (live, names only)
Connect with ADMIN_DATABASE_URL and list schemas, tables, views and columns with their types: names only, never rows. Use it to learn how a database is structured, or feed it to preview_scope.