Overview
File:src/tools/BasketTool.ts
Nine tools demonstrating the complete shopping cart workflow from creation to checkout.
The Complete Shopping Flow
1
Create Basket
Start a new shopping session
2
Add Items
Add products to cart (can add multiple)
3
Manage Cart
Remove items, update quantities, add notes
4
Checkout
Convert basket to order
Key Tools
CreateBasketTool
AddItemToBasketTool
CheckoutBasketTool
All 9 Tools
- CreateBasketTool - Start shopping
- GetBasketsTool - List all baskets
- AddItemToBasketTool - Add products
- RemoveItemFromBasketTool - Remove products
- ClearBasketTool - Empty cart
- UpdateBasketStatusTool - Change status
- UpdateBasketMetadataTool - Add notes/data
- CheckoutBasketTool - Convert to order
- GetBasketByIdTool - View specific basket
Testing the Flow
- “Create a shopping basket”
- “Search for laptop”
- “Add that laptop to my basket”
- “Show me my cart”
- “Checkout with shipping to 123 Main St, New York”
What You’ll Learn
Multi-Step Workflows
Handle complex processes
State Management
Track cart state over time
API Chaining
Combine multiple API calls
Business Logic
Implement e-commerce rules

