Skip to main content
Runs a SELECT against a connected PostgreSQL database. Display name “PostgreSQL Query”. Off by default.

Authentication and enablement

Requires a workspace Postgres integration. Host, port, database, user, password, SSL, and optional schema are injected from that integration (x-exclude-from-llm). Enable the tool on the agent and bind the integration.

Inputs

  • query (required): SELECT only. Example: SELECT * FROM users WHERE status = 'active' LIMIT 10.

Output

Structured rows plus the query text. Suitable as content for generate_file.

Limits and side effects

  • Non-SELECT statements are rejected.
  • Read-only by design; use postgres_upsert (separate tool) to write.

Expected errors

  • Missing/invalid integration credentials.
  • Non-SELECT query.
  • SQL error from the database (surfaced as a tool error, not a panic).