Production-grade discount recommendation engine that audits complex category rules and minimum spend thresholds to recommend the optimal promo voucher code
The server provides a single well-defined tool with complete input schemas, clear descriptions, and functional logic. However, it lacks output schema documentation, error handling guidance, and several production patterns. The tool naming is descriptive but could follow verb_noun convention more strictly. The implementation is functional but falls short of production-grade quality standards.
Calculates savings across all coupons and returns the absolute best candidate.
Output schema not documented. The tool returns a complex nested object with 'recommended_coupon' and 'savings_breakdown' fields, but no JSON Schema specification is provided for the response structure. LLMs cannot plan downstream operations without knowing the return type.
No error handling or recovery guidance. The code lacks validation for malformed inputs (e.g., non-numeric price/discount_value, missing required fields in cart items or coupons). When invalid data arrives, there is no error message telling the LLM what went wrong or how to retry.
Parameter descriptions lack detail on constraints and formats. The 'cart_items' description says 'List of items in the shopping cart' but does not specify: Are negative prices allowed? Must quantity be >= 1? Is category case-sensitive? LLMs cannot validate their own input without explicit constraints.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
Tool name does not follow verb_noun convention. 'recommend_coupon' is clear but could be more consistent with patterns like 'find_best_coupon' or 'select_optimal_coupon'. Minor issue but affects naming consistency.
No idempotency guarantees documented. The tool is read-only and deterministic (same inputs always produce the same output), making it idempotent by nature. This should be explicitly stated in the tool description so LLMs know it's safe to retry.
Missing MCP server scaffolding. The source code shows a standalone Python class but no evidence of MCP protocol integration (no server initialization, no tool registration via MCP SDK, no protocol message handling). This is a library, not a registered MCP server.