Inventory belongs in the handler
The schema checks the quantity type. The handler checks remaining stock, including items already in the cart. Try adding 10 backpacks to see an intentional failure.
INDUSTRY PLAYGROUND / COMMERCE
Search a catalog, check inventory, and build a demo cart with the same functions an agent can call.
NORTH / SUPPLY
Search a catalog, check inventory, and build a demo cart with the same functions an agent can call.
22L · Recycled canvas
backpack750ml · Insulated steel
bottleCompact · Three compartments
organizerWireless · Out of stock
headphonesTOOL INSPECTOR 5 tools
Filter the visible demo catalog by search text and maximum USD price. Does not place an order.
// Run a tool to inspect its result.
Run tool calls the local handler directly. Native agent calls appear as “Native WebMCP” in the trace.
Newest first. Example workflows are deterministic scripts, not LLM conversations.
No calls yet.
WHAT THIS EXAMPLE TEACHES
The schema checks the quantity type. The handler checks remaining stock, including items already in the cart. Try adding 10 backpacks to see an intentional failure.
The checkout tool creates a review. Only the visible confirmation control completes this fictional order. A real shop would verify prices, inventory and authorization on its server.
COMMON QUESTIONS
No. Products and prices are fixtures. The cart lives only in this browser page and resets on reload.
Connect the tool handlers to your authorized storefront cart operations and keep checkout in your existing purchase flow. This example is not a Shopify integration.
API references reviewed September 7, 2026. Chrome imperative API ↗