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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. While it mentions facts help 'personalize recommendations,' it fails to disclose persistence guarantees, duplicate handling, storage limits, or what the output schema contains.

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

Conciseness4/5

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

Uses an 'Args:' section to document parameters efficiently, includes concrete examples, and avoids redundancy. Structure is clear with purpose stated upfront followed by usage examples.

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?

Adequate for a two-parameter tool with an output schema (which excuses return value documentation), but lacking behavioral details like idempotency or conflict resolution that would be necessary for a production mutation tool.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates effectively by providing semantic examples for 'fact' and explicitly listing the six valid enum values for 'category' ('preferences', 'challenges', etc.) that the schema lacks.

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 'remembers' a 'fact about the user' and lists specific types (preferences, patterns, challenges, strengths, routines). The scope is distinct from siblings like add_task_context or add_daily_note_section, though it doesn't explicitly contrast with them.

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

Usage Guidelines3/5

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

Provides examples of what to store ('Works best in mornings') and implies usage through categories, but lacks explicit guidance on when NOT to use it versus add_task_context or get_user_context, and doesn't mention prerequisites.

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

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