Skip to Content
ResourcesIntegrationsDatabasesPostgres

Postgres

Postgres icon
Arcade Optimized

Tools to query and explore a postgres database

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

Arcade's Postgres toolkit connects to a PostgreSQL database and lets agents explore structure and run read-only queries without writing raw connection logic.

Capabilities

  • Schema & table discovery — enumerate all schemas and tables in a database before constructing any query, ensuring exact object names are known.
  • Table introspection — retrieve the full column structure of any named table prior to querying it.
  • Read-only query execution — run parameterized SELECT statements with support for joins, filters, aggregations, ordering, and pagination; INSERT, UPDATE, DELETE, and DDL are blocked.

Secrets

POSTGRES_DATABASE_CONNECTION_STRING — A standard PostgreSQL connection URI that encodes the host, port, database name, username, and password used to authenticate against your Postgres instance. The format is postgresql://user:password@host:port/dbname (or postgres://…). Obtain the individual components from whoever administers the database (cloud provider console, self-hosted config file, or a secrets manager). For managed services, the full URI is typically available in the provider's dashboard under connection details — for example, in AWS RDS it appears under Connectivity & security, in Supabase under Project Settings → Database, and in Heroku under Settings → Config Vars. Store this value as an Arcade secret rather than embedding it in prompts or code.

See Arcade secret configuration docs for setup instructions, and manage secrets 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. 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, so that their exact names are known.
1
Last updated on