Production-ready orchestrator for auditing e-commerce carts, applying discount logic, calculating shipping, and outputting payment gateway configurations with built-in SHA256 integrity signature calculations.
This server implements a single tool (orchestrate_checkout) with significant definition gaps. The tool name is reasonable but the schema is incomplete, descriptions lack clarity on LLM guidance, and critical security issues undermine production readiness. The input schema visible in the source shows proper JSON Schema structure with types and descriptions for parameters (cart_items, discount_code, shipping_address, gateway), but the output schema is entirely undocumented, LLMs cannot predict the structure of the response. Error handling is present but not LLM-optimized. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) are present despite WRITE risk classification.
Processes cart items, applies pricing reductions, evaluates delivery costs, and constructs signed checkout API request schemas.
Output schema is completely undocumented. The tool returns a dict with pricing_summary, gateway_payload, checkout_url, and signature_hash, but LLMs have no advance knowledge of these fields to plan downstream processing or extract the right data.
Signing secret is injected via environment variable (CHECKOUT_SIGNING_SECRET) but also accepts a parameter during class init. This exposes the secret to agent initialization context if not carefully managed. Tool description does not advise LLM that signing is automatic, LLM may expect to control signature generation.
Tool description lacks LLM guidance on WHEN to call it. Description is purely technical ('Processes cart items, applies pricing reductions...') but does not state prerequisites (e.g., must have valid cart items, country must be recognized, gateway must be stripe|paypal). LLMs cannot determine readiness without explicit prerequisites.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 41 | 2026-07-28+ | v2 |
No tool annotations despite WRITE risk. Tool modifies checkout state and calls external payment APIs (Stripe), but has no destructiveHint or idempotentHint. LLM cannot determine if calling twice creates duplicate charges. No dry-run or confirmation pattern implemented.
discount_code parameter accepts free-form strings but only recognizes SAVE20 and FREESHIP. Invalid codes are silently ignored (discount_amount stays 0). LLM will not know whether discount was applied and may retry with a different code. No enum constraint, no error guidance.
gateway parameter accepts free-form strings (checked with .lower() == 'stripe' / else PayPal). No enum constraint. LLM might pass 'stripe_connect', 'paypal_pro', or typos, which silently default to PayPal. Error should be explicit and actionable.
shipping_address.country is optional with default 'US' but accepts any string. No validation against ISO 3166-1 alpha-2 codes. Invalid country codes result in $19.99 shipping silently applied. No error guidance for LLM.
Stripe API credential (STRIPE_API_KEY) is read from environment but tool behavior changes based on presence/absence ('mock' token vs real session). LLM has no visibility into whether real charges will be attempted. No indication in response whether session is mock or real.
CheckoutOrchestrationError exceptions are raised for invalid input (empty cart, negative price, invalid quantity) but error messages are not LLM-actionable. 'Invalid price or quantity for SKU SKU-ZENITH-SP1' tells LLM the problem but not how to fix it or what values are valid.