shopping-list.feature.yaml

 1feature:
 2  name: shopping-list
 3  product: cooked-mcp
 4  description: Let an agent read and change the Cooked shopping list without needing to understand Cooked's REST update semantics.
 5components:
 6  READ:
 7    requirements:
 8      1: The read tool reads the shopping list when its target is shopping_list.
 9      2: Shopping-list reads include aisle names.
10      3: Shopping-list reads include aisle IDs.
11      4: Shopping-list reads include product group IDs.
12      5: Shopping-list reads include product names.
13      6: Shopping-list reads include quantities when Cooked provides them.
14      7: Shopping-list reads include selected state.
15      8: Shopping-list reads include each product group's containing aisle ID.
16      9: Shopping-list reads include recipe IDs associated with the list when Cooked provides them.
17  ADD:
18    requirements:
19      1: The change_shopping_list tool adds plain-text ingredients to the shopping list.
20      2: Adding ingredients accepts one or more newline-separated ingredients.
21      3: Adding ingredients may associate the ingredients with a saved recipe ID or import draft ID.
22      4: Adding ingredients reports how many ingredients Cooked added.
23  UPDATE_ITEM:
24    requirements:
25      1: The change_shopping_list tool updates a shopping-list product group.
26      2: Updating a product group accepts partial changes from the agent.
27      3: The server reads the current shopping list before sending a product-group update when needed to preserve omitted fields.
28      4: Updating a product group preserves omitted editable fields.
29      5: Updating a product group reports the product group ID that changed.
30      6: Updating a product group requires an explicit product group ID.
31      7: Updating a missing product group reports a user-facing tool error.
32      8: Partial product-group updates preserve the current name, quantity, aisle ID, and selected state unless replacements are provided.
33      9: If update_item omits any editable field, the server fills omitted name, quantity, aisle ID, and selected values from the current shopping list before calling Cooked.
34  SELECTION:
35    requirements:
36      1: The change_shopping_list tool replaces the complete selected product-group set.
37      2: The change_shopping_list tool adds product groups to the selected set without requiring the agent to provide the complete selected set.
38      3: The change_shopping_list tool removes product groups from the selected set without requiring the agent to provide the complete selected set.
39      4: The server reads the current shopping list before add or remove selection changes.
40      5: Selection changes report the resulting selected product-group IDs.
41      6: Selection changes use explicit replace_selection, add_selection, and remove_selection actions.
42      7: Selection changes require product group IDs.
43      8: replace_selection sends exactly the provided product group IDs as the full selected set.
44      9: add_selection reads the current list, unions the provided product group IDs with the current selected set, then sends the full selected set.
45      10: remove_selection reads the current list, subtracts the provided product group IDs from the current selected set, then sends the full selected set.
46  REMOVE:
47    requirements:
48      1: The change_shopping_list tool removes one or more product groups by ID.
49      2: Removing product groups reports the removed product-group IDs.
50  CLEAR:
51    requirements:
52      1: The change_shopping_list tool clears all shopping-list items.
53      2: Clearing the shopping list reports that the list was cleared.
54constraints:
55  ACTIONS:
56    requirements:
57      1: Shopping-list mutations use explicit action values.
58      2: Unknown shopping-list actions are rejected before calling Cooked.
59  SAFETY:
60    requirements:
61      1: Removing product groups requires at least one product group ID.
62      2: Clearing the shopping list is treated as destructive.
63      3: Clearing the shopping list requires the explicit clear action.
64  VERIFICATION:
65    requirements:
66      1: Shopping-list behaviour is verified with fake Cooked HTTP servers.
67      2: Shopping-list tests do not contact the real Cooked service.