Place order
place_orderPlace an order by providing product ID and quantity. Validates product availability and stock, then decrements inventory and returns a confirmation.
Instructions
Place an order for a given quantity of a product. Validates the product exists and that enough stock is available, decrements stock, and returns a mock order confirmation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"productId": "<productId>",
"quantity": "<quantity>"
},
"name": "place_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quantity | Yes | How many units to order. Must be a positive integer. | |
| productId | Yes | The product id to order, e.g. "sku-001". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| total | Yes | ||
| status | Yes | ||
| orderId | Yes | ||
| quantity | Yes | ||
| productId | Yes | ||
| unitPrice | Yes | ||
| remainingStock | Yes |