query_records
Query records from any Gadget model with filtering, sorting, pagination, and field selection. Use introspection tools to discover available fields and filter shapes.
Instructions
Query records from any Gadget model. Supports filtering, sorting, pagination cursors, and field selection. Use introspect_model first to discover available fields, and introspect_filters to see valid filter shapes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model name in singular camelCase, e.g. shopifyOrder, label | |
| fields | Yes | GraphQL field selection, e.g. "id name email createdAt" | |
| filter | No | Filter value — use introspect_filters to discover valid filter fields and shapes. | |
| sort | No | Sort value — array of sort objects, e.g. [{ createdAt: { sortOrder: "Descending" } }] | |
| limit | No | Max records to return (default 10, max 50) | |
| after | No | Pagination cursor — pass the endCursor from a previous response to fetch the next page |