MCP server that generates Next Best Actions for shoppers by querying session state, recommending products, and persisting NBA actions based on behavioral signals
Server has 7 tools with basic schemas and descriptions, but significant gaps limit production readiness. All tools have descriptions (10-100 chars, mostly adequate), and input schemas are present with type definitions. However, output schemas are undocumented, LLMs cannot predict return structures. Parameter descriptions are minimal (e.g., 'Action object to persist' lacks detail on required fields). Error handling is absent: tools return raw dicts or empty lists on failure with no recovery guidance. No tool annotations (readOnlyHint/destructiveHint). Naming is verb-forward but some tools lack clarity on when to use them vs. similar tools (e.g., vector_search_products vs. search_product_by_id). The create_next_best_action tool accepts a generic 'action' dict with no schema validation or field documentation, inviting misuse.
Analyze search patterns and behavioral signals to extract user intent insights
Persist a Next Best Action
Discount message generator based on business logic
Fetch search history (array of search query strings) for a session
Fetch past behavioral signals for a session
Search for a specific product by its MongoDB ObjectId
Vector search for products using intent text - best for semantic similarity
Output schemas undocumented. LLMs cannot predict return structures. vector_search_products returns list of dicts with 'score' field, but no schema tells the agent what fields to expect in each product object.
create_next_best_action accepts generic 'action' dict with no schema validation. Description says 'containing uid, sid, type, and actionMetadata' but does not enforce or validate these fields. LLM cannot know what structure to pass.
No error handling or recovery guidance. Tools return empty lists or error dicts on failure (e.g., get_session_search_history returns [] if no doc found, search_product_by_id returns {"error": "..."}) with no actionable next steps for the LLM.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 67 | <=2025-11-25 | v2 |
No tool annotations. create_next_best_action is destructive (WRITE risk) but lacks destructiveHint. get_session_search_history is read-only but lacks readOnlyHint. Agents cannot infer safety/idempotency.
Parameter descriptions lack detail. 'action' in create_next_best_action is described as 'Action object to persist containing uid, sid, type, and actionMetadata' but does not specify types, required vs. optional, or constraints. 'query' in vector_search_products lacks guidance on intent vs. keyword search.