MCP server that exposes semantic search over user preference rules extracted from AI-generated text corrections. Allows primary drafting agents to retrieve relevant formatting and style preferences before generating text.
Single tool with clear naming (search_active_rules) and reasonable description (127 chars, within 10-1024 range). Input schema is present with proper type and description for the 'query' parameter. However, output schema is completely undocumented, the function returns list[dict[str, Any]] with fields rule_id, rule_summary, score, but this structure is not declared in the tool definition. No error handling guidance, no parameter constraints (e.g., query length limits), and no indication of pagination or result limits despite configurable MCP_SEARCH_TOP_K. The tool is read-only (good security posture) but lacks production-grade documentation expected of A-grade tools.
Search the Night-Shift preference database for relevant user formatting rules and style preferences. Call this before generating any text to ensure your output matches the user's established preferences.
Output schema completely undocumented. Function returns list[dict] with rule_id, rule_summary, score fields, but tool definition does not declare this structure. LLMs cannot plan downstream operations or validate response fields.
No pagination or result limit documentation in tool description. Code enforces MCP_SEARCH_TOP_K limit, but description does not state 'Results limited to N items' or offer offset/limit parameters. Agents cannot request more results or iterate through large result sets.
No error handling guidance. If query is empty, embedding generation fails, or database is unavailable, the tool provides no recovery hints. Description lacks 'When to use' context or prerequisites (e.g., 'Requires active rules in database').
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 51 | <=2025-11-25 | v2 |
Query parameter lacks constraints. No minimum/maximum length, no guidance on natural-language format. LLMs may pass empty strings, single characters, or extremely long queries without validation.
Tool description does not explain similarity scoring or confidence threshold. Users/LLMs cannot interpret why certain rules rank higher or what a 'score' of 0.75 means in context.