Search products
search_productsSearch the Trailhead Supply catalogue the way its search page does: by words or a model number, within a category or brand, by price in USD, in stock only, and by spec filters. Each product comes with its page URL, photo, price, stock line, key specs and category. The answer also gives the total, the same results' URL on the store's website, suggested_filters (categories and spec values with how many products each would leave) and, when nothing matches, did_you_mean with categories and products the store offers instead.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_products"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (default 1). | |
| sort | No | Order: relevance (default), price_asc, price_desc or newest. | |
| brand | No | A brand name. | |
| limit | No | Products per page (default 10). | |
| query | No | Words or a model number. Required unless category or brand is given. | |
| locale | No | Answer language: en (default en). Names, labels and URLs follow it. | |
| filters | No | Spec filters from suggested_filters: code => list of values, e.g. {"color": ["black"]}; a numeric spec also takes "min~max". At most 6 codes of 8 values each. | |
| category | No | A category slug from list_categories or suggested_filters. | |
| in_stock | No | Only products in stock now. | |
| price_max | No | Highest price in USD. | |
| price_min | No | Lowest price in USD. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | These results on the store's website. | |
| page | Yes | ||
| total | Yes | All matching products, across pages. | |
| per_page | Yes | ||
| products | Yes | ||
| truncated | No | Present and true only when the answer outgrew the size budget and its last list items were left out; ask narrower to see them. | |
| answer_type | No | What this answer is, for rendering. | |
| did_you_mean | Yes | Only when nothing matched: what the store suggests instead. | |
| applied_filters | Yes | ||
| suggested_filters | Yes |