Preview Table Data
kb_table_dataPreview table data with optional filtering, pagination, and ordering. Supports WHERE conditions, LIMIT/OFFSET, and ORDER BY without writing full SQL.
Instructions
Preview data from a table with optional filtering and pagination.
A convenient shortcut for common SELECT operations without writing full SQL.
Args:
table (string): Table name
schema (string, optional): Schema name, defaults to DB_SCHEMA env or 'public'
limit (number, default 100, max 1000): Number of rows
offset (number, default 0): Rows to skip
where (string, optional): WHERE condition (without WHERE keyword)
order_by (string, optional): ORDER BY clause (without ORDER BY keyword)
Returns: Formatted table of row data with total count.
Examples:
table: "users", limit: 10, where: "status = 'active'", order_by: "created_at DESC"
table: "orders", limit: 50, offset: 100
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of rows to return (default: 100, max: 1000) | |
| table | Yes | Table name to preview data from | |
| where | No | Optional WHERE clause (without the WHERE keyword), e.g. "status = 'active'" | |
| offset | No | Number of rows to skip (default: 0) | |
| schema | No | Schema name (default: from DB_SCHEMA env or 'public') | |
| order_by | No | Optional ORDER BY clause (without the ORDER BY keyword), e.g. "created_at DESC" |