Switchback

Trail & road running, outfitted.

This storefront publishes its own page tools through document.modelContext.registerTool(). Persona snapshots them on every turn, ships them as clientTools[] to a direct Vercel AI SDK backend (no Runtype), and when the agent calls one the widget runs it here on the page and posts the result back via /resume. Ask the assistant → and watch the catalog, cart, and wire log react.

Catalog

11 products
running shoes
Trailblaze Pro
V612 · blue
$129.00SHOE-001
running shoes
Trailblaze Pro
V612 · black
$129.00SHOE-002
running shoes
Cloudstrider 5
Aether · white
$149.00SHOE-003
running shoes
Cloudstrider 5
Aether · blue
$149.00SHOE-004
running shoes
Marathon Elite
Aether · red
$179.00SHOE-005
trail running shoes
TrailGrip GTX
Summit · green
$159.00SHOE-006
trail running shoes
TrailGrip GTX
Summit · grey
$159.00SHOE-007
jacket
StormShell Jacket
Summit · blue
$89.00JKT-001
jacket
StormShell Jacket
Summit · black
$89.00JKT-002
socks
RunDry Socks (3-pack)
V612 · white
$18.00SCK-001
shorts
Tempo Shorts
Aether · navy
$39.00SHRT-001

Cart

Your cart is empty — ask the assistant to add something.

WebMCP wire log0 events
No events yet — ask the assistant something.
registerdispatch · clientTools[]approval gatepage execbatched /resume

Try it

  1. Browse (read-only): “find a waterproof trail shoe under $170” → search_products auto-approves; matching cards light up.
  2. Inspect (read-only): “tell me about SHOE-005” → view_product; the card flashes.
  3. Parallel (the headline): “add SHOE-001 and SHOE-007 at the same time” → two add_to_cart calls, each with its own approval bubble, batched into a single /resume.
  4. Promo: “apply code TRAIL10 and show my cart total” → apply_promo, gated; the discount line appears.