suggest_claudemd_update
Generate CLAUDE.md update suggestions based on learned patterns from user corrections to improve AI assistant configuration without applying changes automatically.
Instructions
Get suggestions for CLAUDE.md updates based on learned patterns (does not apply them)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| min_confidence | No | Minimum confidence threshold | |
| project_path | No | Project path for project-specific suggestions (optional) |
Implementation Reference
- Core handler logic: Queries the tool_preferences table for high-confidence, unvalidated learned preferences matching project/global scope, returns up to 10 suggestions with metadata.def suggest_updates( self, project_path: Optional[str] = None, min_confidence: float = 0.7 ) -> List[Dict[str, Any]]: """ Get suggestions for CLAUDE.md updates without applying them Returns: List of suggested updates with metadata """ suggestions = [] with sqlite3.connect(self.db_path) as conn: conn.row_factory = sqlite3.Row # Find preferences not yet in CLAUDE.md if project_path: where_clause = "project_path = ? AND project_specific = TRUE" params = (project_path, min_confidence) else: where_clause = "project_specific = FALSE" params = (min_confidence,) cursor = conn.execute(f""" SELECT category, preference, confidence, apply_count, learned_from FROM tool_preferences WHERE {where_clause} AND confidence >= ? AND last_validated IS NULL ORDER BY confidence DESC, apply_count DESC LIMIT 10 """, params) for row in cursor.fetchall(): suggestions.append({ "category": row["category"], "preference": row["preference"], "confidence": row["confidence"], "apply_count": row["apply_count"], "learned_from": row["learned_from"], "recommended": row["confidence"] >= 0.8 }) return suggestions
- src/mcp_standards/server.py:579-598 (handler)MCP tool wrapper handler: Delegates to ClaudeMdManager.suggest_updates and returns formatted JSON response.async def _suggest_claudemd_update( self, project_path: Optional[str] = None, min_confidence: float = 0.7 ) -> Dict[str, Any]: """Get suggestions for CLAUDE.md updates""" try: suggestions = self.claudemd_manager.suggest_updates( project_path=project_path, min_confidence=min_confidence ) return { "success": True, "suggestions": suggestions, "count": len(suggestions), "project_path": project_path or "global", "message": f"Found {len(suggestions)} suggestion(s) for CLAUDE.md update" } except Exception as e: return {"success": False, "error": str(e)}
- src/mcp_standards/server.py:215-225 (registration)MCP tool registration defining name, description, and input schema.Tool( name="suggest_claudemd_update", description="Get suggestions for CLAUDE.md updates based on learned patterns (does not apply them)", inputSchema={ "type": "object", "properties": { "project_path": {"type": "string", "description": "Project path for project-specific suggestions (optional)"}, "min_confidence": {"type": "number", "description": "Minimum confidence threshold", "default": 0.7}, }, }, ),
- src/mcp_standards/server.py:292-297 (handler)Dispatch logic in the main call_tool handler that routes tool calls to _suggest_claudemd_update.elif name == "suggest_claudemd_update": result = await self._suggest_claudemd_update( arguments.get("project_path"), arguments.get("min_confidence", 0.7) ) return [TextContent(type="text", text=json.dumps(result))]
- Model routing complexity classification for cost-optimized execution."suggest_claudemd_update": TaskComplexity.MODERATE, "calculate_significance": TaskComplexity.MODERATE,