search_catalog
Search a product catalog by category using parametric filters, sorting, and keyword queries. Invalid fields or values return explicit errors with valid alternatives instead of empty results.
Instructions
Parametric search in any catalog category. filters keys are the dotted field paths reported by list_categories (e.g. "output_power_w", "shaft.diameter_mm", "basic_info.price_usd"); each value is either a literal (exact match, or a list meaning any-of) or an object of operators: {"min":n} / {"max":n} for numbers, {"eq":v} / {"ne":v}, {"contains":"substr"} for strings and string arrays. Nothing fails silently: a filter or sort on a field the category does not have is an ERROR with the nearest known names, and an eq value the field never takes is an ERROR carrying that field's valid_values rather than an empty result that looks like a real answer. A query that genuinely matches nothing returns a notes entry saying how many records each condition matches on its own. Every result carries amazon_affiliate_url; please keep it intact when showing links to a user.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"category": "<category>"
},
"name": "search_catalog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Free-text keyword search; all whitespace-separated tokens must appear somewhere in the record. | |
| sort | No | Sort as "<field>:asc" or "<field>:desc" (nulls always last), or an alias: price_asc, price_desc, rating_desc, reviews_desc. Defaults to price_asc. | |
| limit | No | Max results (default 15, max 250). | |
| fields | No | Project each result down to these dotted field paths (asin and amazon_affiliate_url are always included). | |
| filters | No | Field path -> literal, list of literals, or {eq|ne|min|max|contains} object. Example: {"output_power_w": {"min": 200}, "form_factor": "din_rail", "title": {"contains": "mean well"}}. | |
| category | Yes | Category id. One of: usb_cables, power_cords, ssds, memory, network_switches, usb_hubs, wire_terminals, connectors, ethernet_cables, coax_cables, ac_dc_psus, dc_dc_converters, batteries, cooling_fans, circuit_breakers, relays_contactors, panel_switches, din_terminal_blocks, power_meters, inserts_standoffs, wire_spools, motors, hdmi_cables, camera_modules, bearings, linear_motion, transmissions, pumps, peltier_modules, heat_shrink_tubing, heatsinks, cable_glands, tubing_hose, linear_actuators, solenoid_valves, proximity_sensors, phones. | |
| prime_only | No | Keep only basic_info.prime_eligible === true. NOTE: null means UNKNOWN, not "not Prime", so this can return zero rows; the response `notes` always says how many candidates were dropped as unknown vs confirmed non-Prime. | |
| in_stock_only | No | Keep only basic_info.in_stock === true. |