A mcp server that searches a product catalog using Vertex AI Search for Retail.
Single tool with clear naming ('search_products' starts with verb 'search'), decent descriptions, and a well-structured schema. However, several quality gaps prevent higher scores: parameter descriptions lack format constraints and depth; output schema is not formally documented; error handling is generic and does not guide recovery; no pagination support despite acknowledging large result sets; and security considerations around visitor_id and filter injection are not addressed.
Searches the product catalog for a given query and streams the detailed information for each product found. For detailed information on filtering and ordering with search, see: https://cloud.google.com/retail/docs/filter-and-order
Parameter descriptions lack actionable format constraints. 'brand', 'color_families', 'category', 'size' are marked optional but have no enum constraints, regex patterns, or examples of valid values. LLMs will hallucinate invalid filter strings.
Output schema not documented. The tool yields dictionaries from `retail_v2.Product.to_dict(product_detail)` but the response structure is never defined. LLMs cannot plan downstream operations or extract required fields without knowing the schema.
Error handling is generic and does not guide recovery. Errors yield `{"error": "...", "details": "..."}` but do not indicate whether the failure is retryable, user-fixable, or fatal. InvalidArgument exception suggests invalid filter syntax, but the error message does not guide the LLM to fix the filter or provide available filter options.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 7 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 52 | - | v1 |
No pagination or result limiting strategy. The tool accepts `page_size` (default 10) but does not document max results, whether pagination is supported, or how to retrieve additional pages. Large result sets could exhaust context windows.
Parameter 'visitor_id' defaults to 'guest-user' but is exposed as a tool parameter. If this is meant to track user identity for personalization, it should be injected server-side from request context, not exposed to the agent. Exposing user tracking IDs in tool params risks data leakage.
Filter string construction is vulnerable to injection. The tool builds filter strings like `(brand: ANY("..."))` by concatenating user input without validation or escaping. Malformed input or special characters in filter values could break API calls or trigger unintended filter behavior.
Tool description references external documentation ('For detailed information on filtering and ordering with search, see: https://cloud.google.com/retail/docs/filter-and-order') instead of inline parameter constraints. LLMs will not follow URLs, constraints must be in parameter descriptions.