Skip to main content
Glama

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
NameRequiredDescriptionDefault
min_confidenceNoMinimum confidence threshold
project_pathNoProject 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
  • 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)}
  • 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}, }, }, ),
  • 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,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/airmcp-com/mcp-standards'

If you have feedback or need assistance with the MCP directory API, please join our Discord server