Find Many Rows
db_find_manyQuery database rows using filters, column selection, sorting, and pagination to retrieve exactly the data you need.
Instructions
Queries rows from a table with flexible filtering, column selection, sorting, and pagination. This is the primary tool for reading data. All parameters are optional except 'table' — omitting filters returns all rows (up to the limit). The default limit is 50 rows; the maximum is 500. Sensitive columns (passwords, tokens, keys) are automatically redacted in the output.
When to use:
"Show me recent orders", "Find users with email containing gmail"
"List products sorted by price", "Get page 2 of customers"
Any read query that needs filtering, sorting, or pagination
Parameter guidance:
where: JSON filter object. Supports operators: eq, neq, gt, gte, lt, lte, contains, startsWith, endsWith, in, notIn. Example: {"status": "active", "age": {"gt": 18}}
select: JSON array of column names to return. Example: ["id", "name", "email"]
orderBy: JSON object with column name and direction. Example: {"created_at": "desc"}
take: max rows to return (default 50, max 500)
skip: rows to skip for offset pagination
Behavioral notes:
All queries run in a read-only transaction with a configurable timeout (default 10s).
The table name is validated against the live schema before query execution.
Results include pagination metadata (total count when available).
On error, returns a clear message explaining what went wrong.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skip | No | Rows to skip for pagination | |
| take | No | Max rows to return (default 50, max 500) | |
| table | Yes | Name of the table to query | |
| where | No | JSON filter object, e.g. '{"email":{"contains":"@gmail"}}' | |
| select | No | JSON array of column names, e.g. '["id","email"]' | |
| orderBy | No | JSON object, e.g. '{"createdAt":"desc"}' | |
| database | No | Name of the database to query (from pgautopilot.json). Omit to use the current default database. |