Conversations server tools
The Conversations server exposes a small set of tools that your AI assistant can call during a shopping conversation. The AI assistant decides which tool to use based on the shopper's question — you don't configure this manually.
All tools run against the Pacific Apparel sample catalog. The catalog is fixed and read-only.
search_products
search_productsSearches the catalog by attribute and returns ranked results.
Your AI assistant calls this tool when a shopper has specified what they want — a product type, color, size, price range, brand, or any combination.
Behavior
- Returns products that match the specified attributes, ranked by relevance.
- Automatically relaxes the least important filter when strict criteria return too few results, and reports the change so your AI assistant can communicate it to the shopper.
- Generates refinement suggestions based on the result set — real price brackets, available colors, and other attributes — not hardcoded text.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Product-attribute search terms only |
filters | object | No | Structured filters with must/must_not logic on catalog attributes |
limit | integer | No | Maximum number of results (default: 10, max: 25) |
Available filter attributes
The Pacific Apparel catalog supports filtering on:
data.gender—male,femaledata.color— common color valuesdata.material— material typesdata.style— style descriptorsdata.season— seasonal tagsdata.special_offer—blackfriday,back2school,mothersday,christmas,valentine,easterdata.price— numeric range (usegte,lte)data.brand— exact brand name
Response parameters
The tool returns an object with the following fields:
| Field | Type | Description |
|---|---|---|
products | array | Matched product items, ranked by relevance |
relaxed | object | Results returned when strict filters returned too few products. Includes a dropped_filters array showing which filters were progressively dropped |
FAQs | array | Category-based question and answer pairs related to the search |
refinement_schema | object | Attribute distributions in the result set. Use these to present refinement choices to the shopper |
refinement_suggestions | array | Natural-language hints for constructing smart filters, such as budget, premium, or highly-rated |
search_productCollections
search_productCollectionsRuns multiple independent product searches in a single call. Useful when a shopper expresses several distinct intents at once — for example, "a casual shirt for him and a midi skirt for her."
Your AI assistant calls this tool when a shopper's message includes orthogonal intents that wouldn't combine into a single search.
Behavior
- Runs each sub-search independently with its own query, filters, and limit.
- Supports up to 5 sub-searches in a single call.
- Returns sub-results in the same order they were requested.
When intents are correlated rather than independent — for example, "a top that goes with these jeans" — your AI assistant should call search_products sequentially instead. Correlated intents need reasoning between searches.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
searches | array | Yes | Up to 5 sub-search objects. Each sub-search runs independently |
Each sub-search object has the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
query | string | No | Product-attribute search terms only. Omit or leave empty for filter-only searches |
filters | object | No | Structured filters with must/must_not logic |
limit | integer | No | Maximum number of results (default: 10, max: 25) |
Response parameters
Returns an array of search results, one per sub-search, in the same order as the request. Each sub-result has the same shape as a search_products response.
get_product
get_productFetches the full details of a specific product by identifier.
Your AI assistant calls this tool when a shopper references a specific product, or when it needs to follow up on a result from an earlier search.
Behavior
- Accepts either a variant-level identifier (
itemId) or a parent-level identifier (product_id). - Returns the parent product plus all its variants.
- Returns an explicit "not found" response when the identifier doesn't match anything.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
productIdentifier | string | Yes | The product ID or item ID to look up |
Response parameters
When the product is found:
| Field | Type | Description |
|---|---|---|
found | boolean | true when the product is found |
product_id | string | The parent product ID |
matched_field | string | The field that matched the lookup, such as itemId or data.gtin |
matched_item_id | string | The specific item ID that matched |
variants | array | All variants of the parent product |
Each variant has the following fields:
| Field | Type | Description |
|---|---|---|
itemId | string | Variant identifier |
data | object | Variant attributes such as title, size, and color |
Example response when found:
{
"found": true,
"product_id": "ABC-123",
"matched_field": "data.gtin",
"matched_item_id": "ABC-123-S",
"variants": [
{"itemId": "ABC-123-S", "data": {"title": "...", "size": "S"}},
{"itemId": "ABC-123-M", "data": {"title": "...", "size": "M"}}
]
}When the product is not found:
| Field | Type | Description |
|---|---|---|
found | boolean | false when no product matches |
code | string | The identifier that was looked up |
message | string | Explanation of why no product was found |
Example response when not found:
{
"found": false,
"code": "ABC-999",
"message": "No product found for code 'ABC-999'"
}seeker_products
seeker_productsGuides a shopper through follow-up questions when they don't know exactly what they want, then transitions into a search once it has enough context.
Your AI assistant calls this tool when a shopper is browsing, looking for a gift, or has expressed only a vague intent.
Behavior
- Generates follow-up questions based on an overview of the catalog — categories, price ranges, and product types.
- Uses the shopper's responses to build context for a search.
- Transitions to
search_productsorsearch_productCollectionsautomatically once enough context is gathered.
Request parameters
This tool takes no arguments. It returns catalog context that your AI assistant uses to guide the conversation.
Response parameters
The tool returns an object with the following fields:
| Field | Type | Description |
|---|---|---|
knowledge_base | string | Catalog overview covering inventory, budget tiers, gift selection guidance, and seasonal options |
follow_up_guidance | string | Suggested clarifying questions for your AI assistant to ask, in priority order |
transition_guidance | string | Routing rules describing when to transition to search_products or search_productCollections |
refinement_schema | object | Attribute distributions across the catalog, used to construct precise filters once enough context is gathered |
Related pages
- Test the Conversations server: verification prompts for each tool.
- Best practices: tips on prompt design and prototype evaluation.
Updated about 2 hours ago
