Complete documentation for all 14 production-ready tools
Search the product catalog with optional filters for category, price, and sorting.
Read-OnlySearch keywords. Searches across product title, description, and keywords.
Filter by category ID (e.g., "electronics", "clothing").
Minimum price in cents (e.g., 1000 = $10.00).
Maximum price in cents (e.g., 200000 = $2000.00).
Sort order: "price_asc", "price_desc", "newest", "popular". Default: "popular".
Results per page. Default: 20. Max: 100.
Pagination offset. Default: 0.
{
"items": [
{
"id": "products:abc123",
"title": "Laptop Pro",
"priceCents": 129900,
"imageUrls": [
"https://cdn.example.com/product1.jpg"
],
"stockQuantity": 25,
"categoryId": "electronics",
"rating": 4.8,
"reviewCount": 156
}
],
"total": 45,
"limit": 20,
"offset": 0
}Retrieve detailed product information including reviews and seller info.
Read-OnlyProduct ID in format "products:abc123xyz".
{
"id": "products:abc123",
"title": "Laptop Pro",
"description": "High-performance laptop with...",
"priceCents": 129900,
"imageUrls": ["https://...", "https://..."],
"stockQuantity": 25,
"categoryId": "electronics",
"sellerId": "users:seller456",
"seller": {
"name": "TechStore Inc",
"rating": 4.9,
"reviewCount": 523
},
"rating": 4.8,
"reviewCount": 156,
"reviews": [
{
"rating": 5,
"comment": "Excellent quality!",
"author": "Anonymous",
"dateCreated": 1710763200
}
],
"dateCreated": 1710763200
}Real-time inventory check for a product.
Read-OnlyProduct ID (e.g., "products:abc123").
Quantity to check. Default: 1.
{
"product_id": "products:abc123",
"available": true,
"stock_quantity": 25,
"requested_quantity": 1,
"message": "In stock"
}Add items to the shopping cart with quantity validation.
WriteProduct ID (e.g., "products:abc123").
Quantity to add (≥ 1).
Product variant or SKU if applicable.
{
"product_id": "products:abc123",
"quantity": 1,
"added": true,
"cart": {
"items": [
{
"product_id": "products:abc123",
"quantity": 1,
"unitPriceCents": 129900
}
],
"itemCount": 1,
"subtotalCents": 129900,
"taxAmountCents": 16887,
"shippingCostCents": 0,
"totalAmountCents": 146787
}
}Remove items from the cart.
WriteProduct ID to remove.
Quantity to remove. If omitted, removes all items.
{
"removed": true,
"quantity_removed": 1,
"cart": {
"items": [],
"itemCount": 0,
"subtotalCents": 0,
"taxAmountCents": 0,
"totalAmountCents": 0
}
}Retrieve the current shopping cart.
Read-Only{
"items": [
{
"product_id": "products:abc123",
"title": "Laptop Pro",
"quantity": 1,
"unit_price_cents": 129900,
"line_total_cents": 129900,
"image_url": "https://..."
}
],
"itemCount": 1,
"subtotalCents": 129900,
"taxAmountCents": 16887,
"shippingCostCents": 0,
"coupon_applied": null,
"discount_cents": 0,
"totalAmountCents": 146787,
"lastUpdated": 1710763200
}Apply a discount code to the current cart.
WriteCoupon code (e.g., "SAVE15", "WELCOME20").
{
"applied": true,
"code": "SAVE15",
"discount_cents": 19485,
"discount_percent": 15,
"new_total_cents": 127302,
"expiration_date": "2026-12-31",
"terms": "15% off orders over $50"
}THE KEY CAPABILITY — Create a Stripe Checkout Session with embedded checkout, automatic tax, shipping rates, and multiple payment methods.
WriteShipping address with the following fields:
street (string, required) — Street address
city (string, required) — City name
province (string, required) — 2-letter code (ON, BC, AB, etc.)
postalCode (string, required) — Format: "A1A 1A1"
country (string, required) — Must be "CA" (Canada only)
phone (string, required) — E.164 format "+1XXXXXXXXXX"
Discount code (must be applied to cart first).
{
"sessionId": "cs_test_...",
"sessionUrl": "https://checkout.stripe.com/pay/cs_test_...",
"clientSecret": "...",
"publishableKey": "pk_test_...",
"subtotalCents": 129900,
"taxAmountCents": 16887,
"shippingCostCents": 0,
"discountCents": 0,
"totalCents": 146787,
"status": "ready_for_payment",
"paymentMethods": [
"card",
"link",
"cash_app",
"afterpay_clearpay"
],
"expiresAt": 1710776400
}View order history with optional filtering by status.
Read-OnlyFilter by status: "pending", "confirmed", "shipped", "delivered", "cancelled".
Results per page. Default: 20. Max: 100.
Pagination offset. Default: 0.
Sort order: "newest" (default) or "oldest".
{
"orders": [
{
"id": "orders:order123",
"buyerId": "users:buyer456",
"status": "confirmed",
"totalAmountCents": 146787,
"itemCount": 1,
"createdAt": 1710763200,
"estimatedDelivery": "2026-03-25"
}
],
"total": 5,
"limit": 20,
"offset": 0
}Retrieve detailed order information including items, totals, and tracking.
Read-OnlyOrder ID (e.g., "orders:abc123").
{
"id": "orders:order123",
"buyerId": "users:buyer456",
"sellerId": "users:seller789",
"status": "confirmed",
"items": [
{
"productId": "products:xyz",
"name": "Laptop Pro",
"quantity": 1,
"unitPriceCents": 129900,
"imageUrl": "https://..."
}
],
"subtotalCents": 129900,
"taxAmountCents": 16887,
"shippingCostCents": 0,
"totalAmountCents": 146787,
"shippingAddress": {
"street": "123 Main St",
"city": "Toronto",
"province": "ON",
"postalCode": "M5V 3A8",
"country": "CA"
},
"trackingNumber": null,
"createdAt": 1710763200,
"confirmedAt": 1710763200,
"shippedAt": null,
"deliveredAt": null,
"paymentIntentId": "pi_test_...",
"refundRequested": false
}Initiate a return/refund request for an order or specific items.
WriteOrder ID (e.g., "orders:abc123").
Return reason: "damaged", "wrong_item", "not_as_described", "other".
Additional details about the return.
{
"return_id": "returns:ret123",
"order_id": "orders:order123",
"status": "pending",
"reason": "damaged",
"created_at": 1710763200,
"window_closes_at": 1713441600,
"estimated_refund_amount_cents": 146787,
"message": "Return request received. Seller will review within 2 business days."
}Submit a product review with 1-5 star rating.
WriteProduct ID (e.g., "products:abc123").
Star rating (1-5).
Review title.
Review text.
Link to order (for verified purchase badge).
{
"review_id": "reviews:rev123",
"product_id": "products:abc123",
"rating": 5,
"title": "Excellent quality!",
"comment": "Great laptop, highly recommend",
"verified_purchase": true,
"published": true,
"created_at": 1710763200
}Sales and performance analytics. Requires admin role.
Read-Only • AdminTime period: "day", "week", "month", "year".
ISO date format "2026-03-01".
ISO date format "2026-03-31".
{
"period": "month",
"total_revenue_cents": 1500000,
"total_orders": 42,
"average_order_value_cents": 35714,
"total_items_sold": 98,
"top_products": [
{
"product_id": "products:abc123",
"title": "Laptop Pro",
"units_sold": 15,
"revenue_cents": 1948500
}
],
"top_sellers": [
{
"seller_id": "users:seller789",
"name": "TechStore Inc",
"revenue_cents": 750000,
"orders": 21
}
],
"conversion_rate": 3.2,
"returning_customers": 18,
"new_customers": 24
}{
"error": "Human-readable error message",
"code": "ERROR_CODE",
"statusCode": 400
}| Code | HTTP | Meaning |
|---|---|---|
| VALIDATION_ERROR | 400 | Invalid input (bad postal code, price range, etc.) |
| AUTH_ERROR | 401 | Missing or invalid JWT token |
| AUTHZ_ERROR | 403 | Insufficient permissions (e.g., non-admin accessing admin tool) |
| NOT_FOUND | 404 | Product/order/user doesn't exist |
| CONFLICT | 409 | Business logic violation (e.g., out of stock, return window closed) |
| RATE_LIMIT | 429 | Too many requests — wait before retrying |
| STRIPE_ERROR | 400 | Stripe API error (payment declined, invalid address, etc.) |
| INTERNAL_ERROR | 500 | Server error — report to support |