Skip to main content
The Better Data LLM Gateway includes a set of pre-defined tools that are optimized for commerce conversations.

search_products

The primary tool for product discovery. Input Schema:
  • query (string): Natural language description of what the user is looking for.
  • category (string, optional): Filter by category name.
  • priceMin / priceMax (number, optional): Price range filters.
Example Tool Call:
{
  "name": "search_products",
  "arguments": { "query": "running shoes for marathon", "priceMax": 150 }
}

get_product_details

Retrieve deep information about a specific product. Input Schema:
  • productId (string): The unique identifier from the search results.
Response: Returns a full Product object including images, variants, and detailed descriptions.

check_inventory

Verify availability before adding to cart or checking out. Input Schema:
  • productIds (string[]): List of product IDs to check.
Response: Returns a map of product IDs to their inStock status and quantity available to promise.

add_to_cart

Add one or more variants to the user’s active shopping cart. Input Schema:
  • productId (string): The product to add.
  • variantId (string, optional): Specific size, color, etc.
  • quantity (number, optional, default: 1): How many to add.

create_order

The final step in the conversational flow. Input Schema:
  • shippingAddress (object): User’s delivery details.
  • email (string): Contact email for order confirmation.
Response: Returns a checkoutUrl where the user safely enters payment details on your verified storefront.