query_records
Query a single farmOS record bundle with filters, sorting, field selection, and pagination to retrieve the assets, logs, plans, or terms you need.
Instructions
Query one bundle of records with filtering, sorting and paging. This is the general read tool; search_assets, list_logs and list_plans cover the common cases.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Comma-separated fields, '-' prefix for descending, e.g. '-timestamp' | |
| limit | No | Records per page (max 50), or the total cap when all_pages is true | |
| bundle | Yes | Bundle, e.g. 'plant' for assets, 'harvest' for logs, 'plant_type' for terms | |
| fields | No | Only return these attributes/relationships | |
| offset | No | Skip this many records (ignored when all_pages is true) | |
| filters | No | Field path -> value (equality), list (IN), or {'operator': '>=', 'value': 123}. Operators: =, <>, >, >=, <, <=, STARTS_WITH, CONTAINS, ENDS_WITH, IN, NOT IN, BETWEEN, NOT BETWEEN, IS NULL, IS NOT NULL. Relationship paths work, e.g. {'asset.id': '<uuid>'}. Log 'timestamp' filters take epoch seconds. | |
| include | No | Relationships to embed, comma-separated, e.g. 'asset,location' | |
| all_pages | No | Follow pagination until 'limit' records are collected | |
| entity_type | Yes | Entity type: asset, log, plan, quantity, taxonomy_term, ... |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||