A coupon suggestion service for abandoned shopping cart recovery based on reason codes and cart subtotals
Single tool with minimal definition quality. The tool 'get_coupon' has a reasonable verb-noun name but lacks critical production-grade documentation. Description is present but extremely thin (72 chars, below the 194-char baseline median). Parameters have type declarations (string, float) but lack descriptions explaining the semantic meaning or constraints. No output schema is documented, the return type is inferred from code inspection. Error handling is absent. The tool is read-only (appropriate risk classification) but lacks any guidance on when to call it or how to handle invalid inputs. No parameter validation, enum constraints, or recovery guidance present.
Suggests a coupon code based on reason code and cart subtotal for abandoned cart recovery
Parameter descriptions missing: 'reason_code' and 'cart_subtotal' lack semantic documentation explaining valid values, constraints, or examples.
Output schema not documented. Return type is inferred from code (dict with 'suggested_coupon_code' field) but not formally specified. LLMs cannot plan downstream operations without knowing output structure.
No enum constraint on 'reason_code' parameter. Tool accepts arbitrary strings; only 'pricing' is handled explicitly (returns 'RECOVER15'), all others default to 'FREESHIP'. LLMs will hallucinate invalid reason codes without guidance.
Tool description (72 chars) is far below baseline (194 chars median). Missing context on WHEN to call this tool, WHAT the return value means, and HOW to interpret the coupon code.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 41 | 2026-07-28+ | v2 |
No error handling or recovery guidance. If 'reason_code' is unrecognized or 'cart_subtotal' is invalid (negative, zero), no actionable error message guides the LLM.
No input validation. Negative cart_subtotal, missing reason_code, or type mismatches would cause silent failures or wrong behavior. Production tools should validate and return clear errors.