Skip to main content
Glama

add_user_fact

Store user preferences, challenges, strengths, and patterns to personalize Coach AI's recommendations and support.

Instructions

Remember an important fact about the user.

Use this to remember preferences, patterns, challenges, strengths, routines, etc. These facts help personalize recommendations and support.

Args: fact: The fact to remember (e.g., "Works best in mornings", "Struggles with context switching") category: Category - 'preferences', 'challenges', 'strengths', 'patterns', 'routines', or 'general'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
factYes
categoryNogeneral

Implementation Reference

  • The actual implementation of the tool, which interacts with the database to store the user fact.
    async def add_user_fact(fact: str, category: str = "general") -> str:
        """Remember an important fact about the user.
    
        Args:
            fact: The fact to remember
            category: Category of the fact
    
        Returns:
            Success message
        """
        db = await get_db()
    
        await db.execute(
            "INSERT INTO user_facts (fact, category) VALUES (?, ?)", (fact, category)
        )
        await db.commit()
    
        return f"✓ Remembered: {fact} (category: {category})"
  • The registration of the tool as an MCP tool, which calls the storage implementation.
    @mcp.tool()
    async def add_user_fact(fact: str, category: str = "general") -> str:
        """Remember an important fact about the user.
    
        Use this to remember preferences, patterns, challenges, strengths, routines, etc.
        These facts help personalize recommendations and support.
    
        Args:
            fact: The fact to remember (e.g., "Works best in mornings", "Struggles with context switching")
            category: Category - 'preferences', 'challenges', 'strengths', 'patterns', 'routines', or 'general'
        """
        return await storage.add_user_fact(fact, category)

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/94aharris/coach-ai'

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