Tool tree
ShopMCP — E-commerce where humans and AI agents shop together via WebMCP
Implementation
gradeNot graded
gradeNot graded
page: Every page
search_productsAnswer
Search the product catalog by query, category, max price, and sort order
View tool JSON
{
"name": "search_products",
"kind": "answer",
"impl": "imperative",
"description": "Search the product catalog by query, category, max price, and sort order",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search term for name or description"
},
"category": {
"type": "string",
"enum": [
"Electronics",
"Home",
"Fashion",
"Books"
]
},
"maxPrice": {
"type": "number",
"description": "Maximum price filter"
},
"sort": {
"type": "string",
"enum": [
"price-asc",
"price-desc",
"rating",
"name"
]
}
}
},
"page": "/"
}get_productAnswer
Get full details for a single product by ID
View tool JSON
{
"name": "get_product",
"kind": "answer",
"impl": "imperative",
"description": "Get full details for a single product by ID",
"inputSchema": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"description": "Product ID (e.g. p1)"
}
},
"required": [
"productId"
]
},
"page": "/"
}add_to_cartAction
Add a product to the shopping cart (persisted in browser localStorage — no sign-in required)
View tool JSON
{
"name": "add_to_cart",
"kind": "act",
"impl": "imperative",
"description": "Add a product to the shopping cart (persisted in browser localStorage — no sign-in required)",
"inputSchema": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"description": "Product ID to add"
},
"quantity": {
"type": "number",
"description": "Quantity (default 1)",
"minimum": 1
}
},
"required": [
"productId"
]
},
"page": "/"
}get_cartAnswer
Get the current shopping cart from browser localStorage
View tool JSON
{
"name": "get_cart",
"kind": "answer",
"impl": "imperative",
"description": "Get the current shopping cart from browser localStorage",
"inputSchema": {
"type": "object",
"properties": {}
},
"page": "/"
}compare_productsAction
Compare 2–4 products side by side by their IDs
View tool JSON
{
"name": "compare_products",
"kind": "act",
"impl": "imperative",
"description": "Compare 2–4 products side by side by their IDs",
"inputSchema": {
"type": "object",
"properties": {
"productIds": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 2,
"maxItems": 4,
"description": "Array of 2–4 product IDs"
}
},
"required": [
"productIds"
]
},
"page": "/"
}remove_from_cartAction
Remove a product from the cart by its product ID
View tool JSON
{
"name": "remove_from_cart",
"kind": "act",
"impl": "imperative",
"description": "Remove a product from the cart by its product ID",
"inputSchema": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"description": "Product ID to remove from cart"
}
},
"required": [
"productId"
]
},
"page": "/"
}get_recommendationsAnswer
Get similar product recommendations based on a product ID (same category, sorted by rating)
View tool JSON
{
"name": "get_recommendations",
"kind": "answer",
"impl": "imperative",
"description": "Get similar product recommendations based on a product ID (same category, sorted by rating)",
"inputSchema": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"description": "Source product ID to base recommendations on"
},
"limit": {
"type": "number",
"description": "Max number of recommendations (default 3, max 6)"
}
},
"required": [
"productId"
]
},
"page": "/"
}apply_couponAction
Apply a discount coupon code. Valid codes: AGENT10 (10% off), DEMO20 (20% off), WEBMCP ($15 off)
View tool JSON
{
"name": "apply_coupon",
"kind": "act",
"impl": "imperative",
"description": "Apply a discount coupon code. Valid codes: AGENT10 (10% off), DEMO20 (20% off), WEBMCP ($15 off)",
"inputSchema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Coupon code to apply (case-insensitive)"
}
},
"required": [
"code"
]
},
"page": "/"
}get_order_summaryAnswer
Get a full order summary: cart items, applied coupon, discounts, shipping, and final total
View tool JSON
{
"name": "get_order_summary",
"kind": "answer",
"impl": "imperative",
"description": "Get a full order summary: cart items, applied coupon, discounts, shipping, and final total",
"inputSchema": {
"type": "object",
"properties": {}
},
"page": "/"
}set_quantityAction
Set the quantity of a specific product in the cart. Use quantity 0 to remove it.
View tool JSON
{
"name": "set_quantity",
"kind": "act",
"impl": "imperative",
"description": "Set the quantity of a specific product in the cart. Use quantity 0 to remove it.",
"inputSchema": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"description": "Product ID whose quantity to change"
},
"quantity": {
"type": "number",
"description": "New quantity (0 removes the item)",
"minimum": 0
}
},
"required": [
"productId",
"quantity"
]
},
"page": "/"
}