Skip to main content
Glama
buyusbcables

buyusbcables

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

NameRequiredDescriptionDefault
qNoFree-text keyword search; all whitespace-separated tokens must appear somewhere in the record.
sortNoSort as "<field>:asc" or "<field>:desc" (nulls always last), or an alias: price_asc, price_desc, rating_desc, reviews_desc. Defaults to price_asc.
limitNoMax results (default 15, max 250).
fieldsNoProject each result down to these dotted field paths (asin and amazon_affiliate_url are always included).
filtersNoField 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"}}.
categoryYesCategory 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_onlyNoKeep 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_onlyNoKeep only basic_info.in_stock === true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: it discloses that invalid filters/sorts error rather than failing silently, that eq values return valid_values, that empty matches produce explanatory notes, and that amazon_affiliate_url must be preserved. It omits pagination behavior and a general statement that this is a read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core capability is front-loaded in the first sentence and subsequent sentences each add distinct value (filter syntax, error contract, notes, affiliate URL). It is dense but not padded; the affiliate-link request is the only sentence that could be trimmed for length, though it is a real behavioral requirement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, no-output-schema tool with nested filter objects, the description covers the failure modes, the notes field, and the always-present affiliate URL, which is the information an agent most needs. Remaining gaps are minor (result shape beyond affiliate URL, pagination) given the 100% schema coverage of parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds genuine value beyond the schema by explaining that filters keys are dotted field paths reported by list_categories and by spelling out the operator vocabulary with examples. The prime_only null-vs-false caveat further clarifies semantics the schema only partially covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Parametric search in any catalog category') and the word 'any' implicitly differentiates it from the category-specific sibling search_usb_cables. It does not explicitly name that sibling, so an agent must infer the scope boundary, but the purpose itself is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It routes the agent to list_categories for discovering valid filter field paths, which is useful implied guidance, and it explains error conditions. However, it never states when to prefer this tool over search_usb_cables or get_product_by_asin, leaving the alternative-selection decision to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.