query_store_products
Retrieve product data from a specified store with optional filters, sorting, and field selection to find matching products.
Instructions
Retrieves product data from a specific store based on filtering and sorting criteria.
Uses a separate Product Data Server to fetch information.
Args: store_name: The name of the store to search within (e.g., 'aeropress_product_cleaned'). This is required. filter_criteria: Optional. A dictionary specifying filter criteria. Keys are field names (e.g., 'price', 'rating'). Values are either exact match values (e.g., {'rating': 4.5}) or dictionaries for operators (e.g., {'price': {'operator': '<', 'value': 50.0}}). Supported operators by the data server include '==', '!=', '<', '>', '<=', '>='. Consult data server documentation (or the available_fields tool) for available fields and operators. sort_by: Optional. The field name to sort the results by (e.g., 'price', 'rating', 'score'). If not specified, the data server might default to 'score' or its own internal default. sort_order: Optional. The order of sorting ('asc' for ascending, 'desc' for descending). Defaults to 'desc'. limit: Optional. The maximum number of products to return. Defaults to 10. fields: Optional. A list of specific fields to include in the results (e.g., ['product_name', 'price', 'product_url']). If not specified, the data server returns all available fields for the matching products.
Returns: A list of product dictionaries matching the criteria on success. Returns a string error message if the data server cannot be reached, the store is not found, or if there's an error during the query.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store_name | Yes | ||
| filter_criteria | No | ||
| sort_by | No | ||
| sort_order | No | desc | |
| limit | No | ||
| fields | No |