WhatsApp consumer grocery replenishment assistant with deterministic intent verification, bounded recovery, and Swiggy Instamart integration
Grocer defines 9 tools with clear action verbs and reasonable descriptions (avg ~100 chars). All tools have input schemas with typed parameters. However, parameter descriptions are sparse or missing context about dependencies and constraints. Output schemas are not documented. Error handling is present but generic (returns success/error dicts without recovery guidance). Tool composition is sound, each tool has one responsibility, but descriptions lack the LLM-optimization depth needed for confident tool selection in ambiguous scenarios.
Add a product variant to the cart with quantity.
Clear all items from the cart.
Fetch current Swiggy Instamart cart.
Retrieve the user's saved delivery addresses from Swiggy.
Place an order with the current cart contents after explicit user confirmation.
Remove a product from the cart by spin_id.
Search products available on Swiggy Instamart for a given address.
Output schemas not documented. Tools return dicts with success/error fields, but LLMs cannot infer the structure of successful responses (e.g., what fields does search_products.products[].variants contain?). This forces LLMs to guess at response structure and risks misuse of returned data.
Parameter descriptions lack constraint details. 'quantity' (integer) has no min/max bounds; 'address_id' and 'spin_id' have no format hints. LLMs cannot validate inputs before calling and may pass invalid values (e.g., negative quantity, malformed IDs).
Error responses are generic. 'success: false, error: str(exc)' provides no recovery guidance. When search_products fails with 'AUTH_EXPIRED', the LLM does not know whether to retry, ask the user, or call a different tool. Errors should categorize as retryable/user-fixable/fatal and suggest next steps.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | <=2025-11-25 | v2 |
Validate and select an active delivery address from saved addresses.
Update the quantity of an item in the cart.
clear_cart has empty input schema ({}). While this is technically valid, the description does not clarify whether it requires confirmation or has side effects. Destructive operations should support a dry-run or explicit confirmation step to prevent accidental data loss.
Tool descriptions do not explain when to use each tool vs. similar ones. 'get_cart' and 'search_products' both interact with inventory, but the description does not clarify the distinction or dependency order. LLMs may call them in wrong sequence or redundantly.