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      5: Adding ingredients accepts simple read-output lines that place a numeric quantity after an em dash separator.
24      6: Adding nonblank ingredients fails when Cooked reports that zero ingredients were added.
25  UPDATE_ITEM:
26    requirements:
27      1: The change_shopping_list tool updates a shopping-list product group.
28      2: Updating a product group accepts partial changes from the agent.
29      3: The server reads the current shopping list before sending a product-group update when needed to preserve omitted fields.
30      4: Updating a product group preserves omitted editable fields.
31      5: Updating a product group reports the product group ID that changed.
32      6: Updating a product group requires an explicit product group ID.
33      7: Updating a missing product group reports a user-facing tool error.
34      8: Partial product-group updates preserve the current name, quantity, aisle ID, and selected state unless replacements are provided.
35      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.
36  SELECTION:
37    requirements:
38      1: The change_shopping_list tool replaces the complete selected product-group set.
39      2: The change_shopping_list tool adds product groups to the selected set without requiring the agent to provide the complete selected set.
40      3: The change_shopping_list tool removes product groups from the selected set without requiring the agent to provide the complete selected set.
41      4: The server reads the current shopping list before add or remove selection changes.
42      5: Selection changes report the resulting selected product-group IDs.
43      6: Selection changes use explicit replace_selection, add_selection, and remove_selection actions.
44      7: Selection changes require product group IDs.
45      8: replace_selection sends exactly the provided product group IDs as the full selected set.
46      9: add_selection reads the current list, unions the provided product group IDs with the current selected set, then sends the full selected set.
47      10: remove_selection reads the current list, subtracts the provided product group IDs from the current selected set, then sends the full selected set.
48  REMOVE:
49    requirements:
50      1: The change_shopping_list tool removes one or more product groups by ID.
51      2: Removing product groups reports the removed product-group IDs.
52  CLEAR:
53    requirements:
54      1: The change_shopping_list tool clears all shopping-list items.
55      2: Clearing the shopping list reports that the list was cleared.
56constraints:
57  ACTIONS:
58    requirements:
59      1: Shopping-list mutations use explicit action values.
60      2: Unknown shopping-list actions are rejected before calling Cooked.
61  SAFETY:
62    requirements:
63      1: Removing product groups requires at least one product group ID.
64      2: Clearing the shopping list is treated as destructive.
65      3: Clearing the shopping list requires the explicit clear action.
66  VERIFICATION:
67    requirements:
68      1: Shopping-list behaviour is verified with fake Cooked HTTP servers.
69      2: Shopping-list tests do not contact the real Cooked service.