Tools
Safety
- Read-only by default, enforced by Postgres. Every read tool runs in a
READ ONLYtransaction, so the server refuses a write even from a function that the statement calls. Run Query also refuses before sending anything: comments, a second statement, and write keywords such asINSERT,UPDATEorSELECT ... INTO. - Limits on every call.
statement_timeoutdefaults to 15 s (up to 55 s withtimeout_seconds). Results stop at 500 rows (up to 5,000 withmax_rows) and 1 MB. A cut result hastruncated: true. - Writes are a separate tool. Execute Statement only runs on a connection stored with mode
read_write, and every call returns aconfirm_tokenfirst that the agent must show you and send back. - No secrets in results. Passwords, connection strings and keys are removed from every error message and masked in results.
- Every call is audited. The audit log records who called, which tool, a SHA-256 of the SQL (never the text), the row count, the duration and the outcome.
Create a read-only role
Connect with a role that can only read. Test Connection warns when the role is a superuser or holds write privileges.GRANT USAGE / GRANT SELECT lines for every schema agents should see. For Slow Queries, enable pg_stat_statements: add it to shared_preload_libraries and run CREATE EXTENSION pg_stat_statements; (RDS, Cloud SQL and Supabase expose it as a parameter or an extension toggle).
Connect
Open PostgreSQL in the dashboard’s tool catalog and click Connect, or let the agent callstore_credential. Fill in host, port, database, user, password and SSL mode. Mode stays Read only unless you want Execute Statement to work.
How Danube reaches the database depends on where it lives:
- Public endpoint
- Private network, SSH bastion
- Private network, data-plane agent
Managed databases with a public endpoint (Supabase, Neon, RDS with public access, Cloud SQL with a public IP) connect directly. TLS is required by default. Allow Danube’s egress addresses in the database’s firewall or security group: see Connect your production database safely.
auth_required), the network (connection_error, destination_blocked) or TLS (tls_error).
Example prompts
- “Which tables in the
publicschema are biggest, and how many rows do they have?” - “Find orders from the last hour with
status = 'payment_failed'and group the errors.” - “Why is this query slow? Explain it and suggest an index.”
- “Is anything blocked in the database right now?”
- “What are the ten slowest statements by mean time?”
