126 lines
5.2 KiB
JSON
126 lines
5.2 KiB
JSON
[
|
|
{
|
|
"name": "render_product_list",
|
|
"description": "Render an interactive product card list. Users can browse products, select specifications (size/flavor/etc.), and add items to cart. Returns the user's selection via mcp-app-response.",
|
|
"inputSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Title displayed at the top of the product list"
|
|
},
|
|
"products": {
|
|
"type": "array",
|
|
"description": "Array of product objects to display as cards",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string", "description": "Unique product identifier" },
|
|
"name": { "type": "string", "description": "Product name" },
|
|
"description": { "type": "string", "description": "Short product description" },
|
|
"image": { "type": "string", "description": "Product image URL" },
|
|
"price": { "type": "number", "description": "Base price" },
|
|
"currency": { "type": "string", "description": "Currency symbol, default: '$'", "default": "$" },
|
|
"specs": {
|
|
"type": "array",
|
|
"description": "Available specification groups (e.g. size, flavor)",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"label": { "type": "string", "description": "Spec group label, e.g. 'Size'" },
|
|
"options": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Option name, e.g. 'Large'" },
|
|
"price_delta": { "type": "number", "description": "Price adjustment, default 0", "default": 0 }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["label", "options"]
|
|
}
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"description": "Optional tags like 'Hot', 'New', 'Sale'"
|
|
}
|
|
},
|
|
"required": ["id", "name", "price"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["title", "products"]
|
|
},
|
|
"_meta": {
|
|
"ui": {
|
|
"resourceUri": "ui://ecommerce-storefront/product-list"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "render_order_confirm",
|
|
"description": "Render an order confirmation page with order details, total price, and a payment action button or QR code. Returns 'confirmed' or 'cancelled' via mcp-app-response.",
|
|
"inputSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Page title, e.g. 'Order Confirmation'"
|
|
},
|
|
"order": {
|
|
"type": "object",
|
|
"description": "Order details",
|
|
"properties": {
|
|
"order_id": { "type": "string", "description": "Order ID" },
|
|
"items": {
|
|
"type": "array",
|
|
"description": "Ordered items",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name with specs" },
|
|
"quantity": { "type": "integer", "description": "Quantity", "default": 1 },
|
|
"price": { "type": "number", "description": "Unit price" },
|
|
"image": { "type": "string", "description": "Product image URL" }
|
|
},
|
|
"required": ["name", "price"]
|
|
}
|
|
},
|
|
"subtotal": { "type": "number", "description": "Subtotal before tax/fees" },
|
|
"tax": { "type": "number", "description": "Tax amount", "default": 0 },
|
|
"discount": { "type": "number", "description": "Discount amount", "default": 0 },
|
|
"total": { "type": "number", "description": "Final total" },
|
|
"currency": { "type": "string", "description": "Currency symbol", "default": "$" }
|
|
},
|
|
"required": ["order_id", "items", "total"]
|
|
},
|
|
"payment": {
|
|
"type": "object",
|
|
"description": "Payment configuration",
|
|
"properties": {
|
|
"method": {
|
|
"type": "string",
|
|
"enum": ["button", "qrcode", "link"],
|
|
"description": "Payment UI type: button (confirm button), qrcode (QR code image), link (external payment URL)"
|
|
},
|
|
"qrcode_url": { "type": "string", "description": "QR code image URL (when method=qrcode)" },
|
|
"payment_url": { "type": "string", "description": "External payment URL (when method=link)" },
|
|
"button_text": { "type": "string", "description": "Payment button text, default: 'Confirm Payment'", "default": "Confirm Payment" }
|
|
},
|
|
"required": ["method"]
|
|
}
|
|
},
|
|
"required": ["title", "order", "payment"]
|
|
},
|
|
"_meta": {
|
|
"ui": {
|
|
"resourceUri": "ui://ecommerce-storefront/order-confirm"
|
|
}
|
|
}
|
|
}
|
|
]
|