Skip to main content
Glama

get_recommendation

Analyze your tasks, goals, and activity to provide personalized next-action suggestions, helping overcome decision paralysis with data-driven recommendations.

Instructions

Get a personalized recommendation for what to do next.

This analyzes the user's current todos, goals, recent activity, and known facts to suggest the most appropriate next action. This is the core "What should I do now?" feature designed to help with decision paralysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core logic for generating recommendation context based on database records.
    async def get_recommendation() -> str:
        """Get a personalized recommendation for what to do next.
    
        Analyzes the user's current todos, goals, recent activity, and known facts
        to suggest the most appropriate next action.
    
        Returns:
            Context string for AI to generate recommendation from
        """
        db = await get_db()
    
        # Get active todos
        todos_cursor = await db.execute(
            """
            SELECT id, title, priority, notes
            FROM todos
            WHERE status = 'active'
            ORDER BY
                CASE priority
                    WHEN 'high' THEN 1
                    WHEN 'medium' THEN 2
                    WHEN 'low' THEN 3
                END,
                created_at ASC
            """
        )
        todos = await todos_cursor.fetchall()
    
        # Get goals
        goals_cursor = await db.execute(
            "SELECT goal, timeframe, category FROM goals WHERE status = 'active' ORDER BY created_at DESC"
        )
        goals = await goals_cursor.fetchall()
    
        # Get user facts
        facts_cursor = await db.execute(
            "SELECT fact, category FROM user_facts ORDER BY created_at DESC LIMIT 10"
        )
        facts = await facts_cursor.fetchall()
    
        # Get recent accomplishments
        accomplishments_cursor = await db.execute(
            "SELECT description, created_at FROM accomplishments ORDER BY created_at DESC LIMIT 5"
        )
        accomplishments = await accomplishments_cursor.fetchall()
    
        # Build comprehensive context
        context = "=== CURRENT STATE FOR RECOMMENDATION ===\n\n"
    
        # Todos section
        if todos:
            context += "ACTIVE TODOS:\n"
            for i, todo in enumerate(todos[:10], 1):  # Limit to top 10
                context += f"  {i}. [{todo['id']}] {todo['title']} (priority: {todo['priority']})\n"
                if todo["notes"]:
                    context += f"      Notes: {todo['notes']}\n"
        else:
            context += "ACTIVE TODOS: None\n"
    
        context += "\n"
    
        # Goals section
        if goals:
            context += "ACTIVE GOALS:\n"
            for goal in goals:
                context += f"  - {goal['goal']} ({goal['timeframe']}, {goal['category']})\n"
        else:
            context += "ACTIVE GOALS: None set yet\n"
    
        context += "\n"
    
        # User context section
        if facts:
            context += "KNOWN ABOUT USER:\n"
            for fact in facts:
                context += f"  - {fact['fact']} ({fact['category']})\n"
        else:
            context += "KNOWN ABOUT USER: Learning about you as we go\n"
    
        context += "\n"
    
        # Recent wins section
        if accomplishments:
            context += "RECENT ACCOMPLISHMENTS:\n"
            for acc in accomplishments:
                context += f"  - {acc['description']}\n"
    
        context += "\n"
        context += "=== RECOMMENDATION REQUEST ===\n\n"
        context += (
            "Based on the above context, provide a specific, actionable recommendation for what "
            "the user should focus on RIGHT NOW. Consider:\n"
            "- Their priorities and goals\n"
            "- Known patterns and preferences\n"
            "- ADHD considerations (decision paralysis, activation energy, time blindness)\n"
            "- The need for clear, concrete next steps\n"
            "- Breaking down overwhelming tasks\n\n"
            "If there are no active todos, encourage the user to add some or reflect on their goals."
        )
    
        return context
  • MCP tool registration for get_recommendation, which calls the recommendation engine implementation.
    @mcp.tool()
    async def get_recommendation() -> str:
        """Get a personalized recommendation for what to do next.
    
        This analyzes the user's current todos, goals, recent activity, and known facts
        to suggest the most appropriate next action. This is the core "What should I do now?"
        feature designed to help with decision paralysis.
        """
        return await recommendations.get_recommendation()
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. It successfully discloses what data sources are analyzed (todos, goals, recent activity, known facts), but fails to explicitly confirm whether this is read-only, if it updates any internal state, or details about the recommendation format.

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?

Three sentences efficiently structured: first defines the action, second explains the analytical mechanism, third provides the user-centric value proposition. No redundant or wasted text.

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

Completeness4/5

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

Given zero parameters and the presence of an output schema (which handles return value documentation), the description adequately explains the business logic and data sources. It could be improved by explicitly stating the read-only nature given the lack of annotations, but it is sufficiently complete for selection and invocation.

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?

The input schema has zero parameters, which per the guidelines establishes a baseline of 4. The description adds value by explaining what implicit inputs are considered (current todos, goals, etc.), providing context that compensates for the empty parameter set.

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

Purpose5/5

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

The description clearly states the tool 'Get[s] a personalized recommendation' and distinguishes it from CRUD siblings (add_todo, list_todos, etc.) by specifying it synthesizes todos, goals, recent activity, and known facts to suggest the next action. The scope and mechanism are specific and unambiguous.

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 usage context ('What should I do now?', 'decision paralysis') that signals when to invoke this over simple list operations. However, it lacks explicit 'when not to use' guidance or named alternatives (e.g., when to use list_todos vs. this tool).

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