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,
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by stating the read-only nature ('does not apply them'), but doesn't mention other important behavioral aspects like what 'learned patterns' means, whether suggestions are personalized, if there are rate limits, authentication requirements, or what format the suggestions come in. The description provides basic safety context but lacks operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise - a single sentence that front-loads the core purpose and includes the crucial behavioral distinction in parentheses. Every word earns its place with zero redundancy or wasted verbiage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter tool with no annotations and no output schema, the description provides adequate basic information about what the tool does and its read-only nature. However, it doesn't explain what 'suggestions' look like (format, structure), what 'learned patterns' refers to, or provide examples of typical use cases. Given the lack of output schema, more detail about return values would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema - it doesn't explain what 'confidence' means in this context, what typical values are, or how the 'project_path' affects suggestions. This meets the baseline 3 when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get suggestions for CLAUDE.md updates based on learned patterns' with the specific verb 'Get suggestions' and resource 'CLAUDE.md updates'. It distinguishes from sibling 'update_claudemd' by explicitly stating 'does not apply them', making it clear this is a read-only suggestion tool rather than a write operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool by contrasting it with 'update_claudemd' - use this to get suggestions without applying them. However, it doesn't specify when to use this versus other suggestion-related tools like 'generate_ai_standards' or 'get_learned_preferences', nor does it mention prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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