Skip to Content
ResourcesIntegrationsDatabasesPostgres

Postgres

Postgres icon
Community

Tools to query and explore a postgres database

Author:Arcade
Version:0.6.1
Auth:No authentication required
4tools
4require secrets

The Arcade Postgres toolkit connects agents and tools to a PostgreSQL database, enabling schema discovery and read-only querying without any OAuth flow.

Capabilities

  • Schema & table discovery — enumerate all schemas and tables in a database before issuing queries, ensuring table names are always resolved correctly.
  • Read-only SELECT execution — run parameterized SELECT queries with full support for JOINs, WHERE, HAVING, ORDER BY, LIMIT, and OFFSET; INSERT/UPDATE/DELETE are explicitly blocked.
  • Guided query workflow — built-in tool instructions enforce a strict discover-schema → get-table-schema → execute-query order to minimize runtime errors.

Secrets

This toolkit requires no OAuth; all authentication is handled via a single connection string secret.

  • POSTGRES_DATABASE_CONNECTION_STRING — A standard PostgreSQL connection URI (e.g., postgresql://user:password@host:5432/dbname) that encodes the host, port, database name, username, and password. Obtain or construct this string from whoever administers the target PostgreSQL instance. For managed services, the connection string is typically available in the provider's dashboard (e.g., AWS RDS → Connectivity & security, Supabase → Project Settings → Database, Render → Environment → Connection String). Ensure the database user has at least CONNECT and SELECT privileges on the relevant schemas and tables; no write permissions are needed or used by this toolkit.

See the Arcade secrets guide for how to register secrets, and manage them at https://api.arcade.dev/dashboard/auth/secrets.

Available tools(4)

4 of 4 tools
Operations
Behavior
Tool nameDescriptionSecrets
Discover all the schemas in the postgres database.
1
Discover all the tables in the postgres database when the list of tables is not known. ALWAYS use this tool before any other tool that requires a table name.
1
You have a connection to a postgres database. Execute a SELECT query and return the results against the postgres database. No other queries (INSERT, UPDATE, DELETE, etc.) are allowed. ONLY use this tool if you have already loaded the schema of the tables you need to query. Use the <GetTableSchema> tool to load the schema if not already known. The final query will be constructed as follows: SELECT {select_query_part} FROM {from_clause} JOIN {join_clause} WHERE {where_clause} HAVING {having_clause} ORDER BY {order_by_clause} LIMIT {limit} OFFSET {offset} When running queries, follow these rules which will help avoid errors: * Never "select *" from a table. Always select the columns you need. * Always order your results. Use the most important columns or the primary key if you're unsure. * Always use case-insensitive queries to match strings in the query. * Always trim strings in the query. * Prefer LIKE queries over direct string matches or regex queries. * Only join on columns that are indexed or the primary key. Do not join on arbitrary columns.
1
Get the schema/structure of a postgres table in the postgres database when the schema is not known, and the name of the table is provided. This tool should ALWAYS be used before executing any query. All tables in the query must be discovered first using the <DiscoverTables> tool.
1
Last updated on